go-common/app/service/live/rankdb/api/liverpc/v1/UserRank.liverpc.go

47 lines
1.2 KiB
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
// Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
// source: v1/UserRank.proto
package v1
import context "context"
import proto "github.com/golang/protobuf/proto"
import "go-common/library/net/rpc/liverpc"
var _ proto.Message // generate to suppress unused imports
// ==================
// UserRank Interface
// ==================
type UserRank interface {
// * 获取用户、主播等级排名
//
GetUserRank(context.Context, *UserRankGetUserRankReq) (*UserRankGetUserRankResp, error)
}
// ========================
// UserRank Live Rpc Client
// ========================
type userRankRpcClient struct {
client *liverpc.Client
}
// NewUserRankRpcClient creates a Rpc client that implements the UserRank interface.
// It communicates using Rpc and can be configured with a custom HTTPClient.
func NewUserRankRpcClient(client *liverpc.Client) UserRank {
return &userRankRpcClient{
client: client,
}
}
func (c *userRankRpcClient) GetUserRank(ctx context.Context, in *UserRankGetUserRankReq) (*UserRankGetUserRankResp, error) {
out := new(UserRankGetUserRankResp)
err := doRpcRequest(ctx, c.client, 1, "UserRank.getUserRank", in, out)
if err != nil {
return nil, err
}
return out, nil
}