123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- // Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
- // source: v0/Smalltv.proto
- /*
- Package v0 is a generated liverpc stub package.
- This code was generated with go-common/app/tool/liverpc/protoc-gen-liverpc v0.1.
- It is generated from these files:
- v0/Smalltv.proto
- */
- package v0
- 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
- // Imports only used by utility functions:
- // =================
- // Smalltv Interface
- // =================
- type Smalltv interface {
- // * 开启抽奖的内部接口
- // 返回的是广播的内容列表
- Start(context.Context, *SmalltvStartReq) (*SmalltvStartResp, error)
- }
- // =======================
- // Smalltv Live Rpc Client
- // =======================
- type smalltvRpcClient struct {
- client *liverpc.Client
- }
- // NewSmalltvRpcClient creates a Rpc client that implements the Smalltv interface.
- // It communicates using Rpc and can be configured with a custom HTTPClient.
- func NewSmalltvRpcClient(client *liverpc.Client) Smalltv {
- return &smalltvRpcClient{
- client: client,
- }
- }
- func (c *smalltvRpcClient) Start(ctx context.Context, in *SmalltvStartReq) (*SmalltvStartResp, error) {
- out := new(SmalltvStartResp)
- err := doRpcRequest(ctx, c.client, 0, "Smalltv.start", in, out)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // =====
- // Utils
- // =====
- func doRpcRequest(ctx context.Context, client *liverpc.Client, version int, method string, in, out proto.Message) (err error) {
- err = client.Call(ctx, version, method, in, out)
- return
- }
|