go-common/app/service/live/banned_service/api/liverpc/client.go
2019-04-22 18:49:16 +08:00

58 lines
1.9 KiB
Go

// Code generated by liverpcgen, DO NOT EDIT.
// source: *.proto files under this directory
// If you want to change this file, Please see README in go-common/app/tool/liverpc/protoc-gen-liverpc/
package liverpc
import (
"go-common/app/service/live/banned_service/api/liverpc/v1"
"go-common/library/net/rpc/liverpc"
)
// Client that represents a liverpc banned_service service api
type Client struct {
cli *liverpc.Client
// V1AdminSilent presents the controller in liverpc
V1AdminSilent v1.AdminSilent
// V1Shield presents the controller in liverpc
V1Shield v1.Shield
// V1ShieldMng presents the controller in liverpc
V1ShieldMng v1.ShieldMng
// V1Silent presents the controller in liverpc
V1Silent v1.Silent
// V1SilentMng presents the controller in liverpc
V1SilentMng v1.SilentMng
// V1SiteBlockMng presents the controller in liverpc
V1SiteBlockMng v1.SiteBlockMng
}
// DiscoveryAppId the discovery id is not the tree name
var DiscoveryAppId = "live.bannedservice"
// New a Client that represents a liverpc live.bannedservice service api
// conf can be empty, and it will use discovery to find service by default
// conf.AppID will be overwrite by a fixed value DiscoveryAppId
// therefore is no need to set
func New(conf *liverpc.ClientConfig) *Client {
if conf == nil {
conf = &liverpc.ClientConfig{}
}
conf.AppID = DiscoveryAppId
var realCli = liverpc.NewClient(conf)
cli := &Client{cli: realCli}
cli.clientInit(realCli)
return cli
}
func (cli *Client) GetRawCli() *liverpc.Client {
return cli.cli
}
func (cli *Client) clientInit(realCli *liverpc.Client) {
cli.V1AdminSilent = v1.NewAdminSilentRpcClient(realCli)
cli.V1Shield = v1.NewShieldRpcClient(realCli)
cli.V1ShieldMng = v1.NewShieldMngRpcClient(realCli)
cli.V1Silent = v1.NewSilentRpcClient(realCli)
cli.V1SilentMng = v1.NewSilentMngRpcClient(realCli)
cli.V1SiteBlockMng = v1.NewSiteBlockMngRpcClient(realCli)
}