// Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT. // source: v0/PayLive.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 // ================= // PayLive Interface // ================= type PayLive interface { // * 生成付费直播信息 // Add(context.Context, *PayLiveAddReq) (*PayLiveAddResp, error) // * 更新付费直播信息 // Update(context.Context, *PayLiveUpdateReq) (*PayLiveUpdateResp, error) // * 获取付费直播列表 // GetList(context.Context, *PayLiveGetListReq) (*PayLiveGetListResp, error) // * 关闭鉴权 // Close(context.Context, *PayLiveCloseReq) (*PayLiveCloseResp, error) // * 开启鉴权 // Open(context.Context, *PayLiveOpenReq) (*PayLiveOpenResp, error) } // ======================= // PayLive Live Rpc Client // ======================= type payLiveRpcClient struct { client *liverpc.Client } // NewPayLiveRpcClient creates a Rpc client that implements the PayLive interface. // It communicates using Rpc and can be configured with a custom HTTPClient. func NewPayLiveRpcClient(client *liverpc.Client) PayLive { return &payLiveRpcClient{ client: client, } } func (c *payLiveRpcClient) Add(ctx context.Context, in *PayLiveAddReq) (*PayLiveAddResp, error) { out := new(PayLiveAddResp) err := doRpcRequest(ctx, c.client, 0, "PayLive.add", in, out) if err != nil { return nil, err } return out, nil } func (c *payLiveRpcClient) Update(ctx context.Context, in *PayLiveUpdateReq) (*PayLiveUpdateResp, error) { out := new(PayLiveUpdateResp) err := doRpcRequest(ctx, c.client, 0, "PayLive.update", in, out) if err != nil { return nil, err } return out, nil } func (c *payLiveRpcClient) GetList(ctx context.Context, in *PayLiveGetListReq) (*PayLiveGetListResp, error) { out := new(PayLiveGetListResp) err := doRpcRequest(ctx, c.client, 0, "PayLive.getList", in, out) if err != nil { return nil, err } return out, nil } func (c *payLiveRpcClient) Close(ctx context.Context, in *PayLiveCloseReq) (*PayLiveCloseResp, error) { out := new(PayLiveCloseResp) err := doRpcRequest(ctx, c.client, 0, "PayLive.close", in, out) if err != nil { return nil, err } return out, nil } func (c *payLiveRpcClient) Open(ctx context.Context, in *PayLiveOpenReq) (*PayLiveOpenResp, error) { out := new(PayLiveOpenResp) err := doRpcRequest(ctx, c.client, 0, "PayLive.open", in, out) if err != nil { return nil, err } return out, nil }