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

86 lines
2.4 KiB
Go

// Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
// source: v2/HighQps.proto
package v2
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
// =================
// HighQps Interface
// =================
type HighQps interface {
// * 某个up主动态,评论中的勋章信息,提供给主站调用
//
ReplyMedals(context.Context, *HighQpsReplyMedalsReq) (*HighQpsReplyMedalsResp, error)
// * 获取直播站佩戴中的勋章
//
LiveWeared(context.Context, *HighQpsLiveWearedReq) (*HighQpsLiveWearedResp, error)
// * 获取用户在直播站领取过的勋章
//
LiveReceived(context.Context, *HighQpsLiveReceivedReq) (*HighQpsLiveReceivedResp, error)
// * 获取某个up主的勋章状态
//
UpMedal(context.Context, *HighQpsUpMedalReq) (*HighQpsUpMedalResp, error)
}
// =======================
// HighQps Live Rpc Client
// =======================
type highQpsRpcClient struct {
client *liverpc.Client
}
// NewHighQpsRpcClient creates a Rpc client that implements the HighQps interface.
// It communicates using Rpc and can be configured with a custom HTTPClient.
func NewHighQpsRpcClient(client *liverpc.Client) HighQps {
return &highQpsRpcClient{
client: client,
}
}
func (c *highQpsRpcClient) ReplyMedals(ctx context.Context, in *HighQpsReplyMedalsReq) (*HighQpsReplyMedalsResp, error) {
out := new(HighQpsReplyMedalsResp)
err := doRpcRequest(ctx, c.client, 2, "HighQps.reply_medals", in, out)
if err != nil {
return nil, err
}
return out, nil
}
func (c *highQpsRpcClient) LiveWeared(ctx context.Context, in *HighQpsLiveWearedReq) (*HighQpsLiveWearedResp, error) {
out := new(HighQpsLiveWearedResp)
err := doRpcRequest(ctx, c.client, 2, "HighQps.live_weared", in, out)
if err != nil {
return nil, err
}
return out, nil
}
func (c *highQpsRpcClient) LiveReceived(ctx context.Context, in *HighQpsLiveReceivedReq) (*HighQpsLiveReceivedResp, error) {
out := new(HighQpsLiveReceivedResp)
err := doRpcRequest(ctx, c.client, 2, "HighQps.live_received", in, out)
if err != nil {
return nil, err
}
return out, nil
}
func (c *highQpsRpcClient) UpMedal(ctx context.Context, in *HighQpsUpMedalReq) (*HighQpsUpMedalResp, error) {
out := new(HighQpsUpMedalResp)
err := doRpcRequest(ctx, c.client, 2, "HighQps.up_medal", in, out)
if err != nil {
return nil, err
}
return out, nil
}