client.go 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // Code generated by liverpcgen, DO NOT EDIT.
  2. // source: *.proto files under this directory
  3. // If you want to change this file, Please see README in go-common/app/tool/liverpc/protoc-gen-liverpc/
  4. package liverpc
  5. import (
  6. "go-common/app/service/live/banned_service/api/liverpc/v1"
  7. "go-common/library/net/rpc/liverpc"
  8. )
  9. // Client that represents a liverpc banned_service service api
  10. type Client struct {
  11. cli *liverpc.Client
  12. // V1AdminSilent presents the controller in liverpc
  13. V1AdminSilent v1.AdminSilent
  14. // V1Shield presents the controller in liverpc
  15. V1Shield v1.Shield
  16. // V1ShieldMng presents the controller in liverpc
  17. V1ShieldMng v1.ShieldMng
  18. // V1Silent presents the controller in liverpc
  19. V1Silent v1.Silent
  20. // V1SilentMng presents the controller in liverpc
  21. V1SilentMng v1.SilentMng
  22. // V1SiteBlockMng presents the controller in liverpc
  23. V1SiteBlockMng v1.SiteBlockMng
  24. }
  25. // DiscoveryAppId the discovery id is not the tree name
  26. var DiscoveryAppId = "live.bannedservice"
  27. // New a Client that represents a liverpc live.bannedservice service api
  28. // conf can be empty, and it will use discovery to find service by default
  29. // conf.AppID will be overwrite by a fixed value DiscoveryAppId
  30. // therefore is no need to set
  31. func New(conf *liverpc.ClientConfig) *Client {
  32. if conf == nil {
  33. conf = &liverpc.ClientConfig{}
  34. }
  35. conf.AppID = DiscoveryAppId
  36. var realCli = liverpc.NewClient(conf)
  37. cli := &Client{cli: realCli}
  38. cli.clientInit(realCli)
  39. return cli
  40. }
  41. func (cli *Client) GetRawCli() *liverpc.Client {
  42. return cli.cli
  43. }
  44. func (cli *Client) clientInit(realCli *liverpc.Client) {
  45. cli.V1AdminSilent = v1.NewAdminSilentRpcClient(realCli)
  46. cli.V1Shield = v1.NewShieldRpcClient(realCli)
  47. cli.V1ShieldMng = v1.NewShieldMngRpcClient(realCli)
  48. cli.V1Silent = v1.NewSilentRpcClient(realCli)
  49. cli.V1SilentMng = v1.NewSilentMngRpcClient(realCli)
  50. cli.V1SiteBlockMng = v1.NewSiteBlockMngRpcClient(realCli)
  51. }