98 lines
3.2 KiB
Go
98 lines
3.2 KiB
Go
|
// Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
|
||
|
// source: v1/Room.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
|
||
|
|
||
|
// ==============
|
||
|
// Room Interface
|
||
|
// ==============
|
||
|
|
||
|
type RoomRPCClient interface {
|
||
|
// * 给大数据用的全量接口
|
||
|
//
|
||
|
AllLiveForBigdata(ctx context.Context, req *RoomAllLiveForBigdataReq, opts ...liverpc.CallOption) (resp *RoomAllLiveForBigdataResp, err error)
|
||
|
|
||
|
// * 根据房间id获取房间信息
|
||
|
//
|
||
|
GetInfoById(ctx context.Context, req *RoomGetInfoByIdReq, opts ...liverpc.CallOption) (resp *RoomGetInfoByIdResp, err error)
|
||
|
|
||
|
// * uid获取房间信息
|
||
|
//
|
||
|
GetStatusInfoByUids(ctx context.Context, req *RoomGetStatusInfoByUidsReq, opts ...liverpc.CallOption) (resp *RoomGetStatusInfoByUidsResp, err error)
|
||
|
|
||
|
// * 获取移动端房间页初始化信息
|
||
|
//
|
||
|
MobileRoomInit(ctx context.Context, req *RoomMobileRoomInitReq, opts ...liverpc.CallOption) (resp *RoomMobileRoomInitResp, err error)
|
||
|
|
||
|
// * 房间发送弹幕数累加
|
||
|
//
|
||
|
IncrDanmuSendNum(ctx context.Context, req *RoomIncrDanmuSendNumReq, opts ...liverpc.CallOption) (resp *RoomIncrDanmuSendNumResp, err error)
|
||
|
}
|
||
|
|
||
|
// ====================
|
||
|
// Room Live Rpc Client
|
||
|
// ====================
|
||
|
|
||
|
type roomRPCClient struct {
|
||
|
client *liverpc.Client
|
||
|
}
|
||
|
|
||
|
// NewRoomRPCClient creates a client that implements the RoomRPCClient interface.
|
||
|
func NewRoomRPCClient(client *liverpc.Client) RoomRPCClient {
|
||
|
return &roomRPCClient{
|
||
|
client: client,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (c *roomRPCClient) AllLiveForBigdata(ctx context.Context, in *RoomAllLiveForBigdataReq, opts ...liverpc.CallOption) (*RoomAllLiveForBigdataResp, error) {
|
||
|
out := new(RoomAllLiveForBigdataResp)
|
||
|
err := doRPCRequest(ctx, c.client, 1, "Room.all_live_for_bigdata", in, out, opts)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *roomRPCClient) GetInfoById(ctx context.Context, in *RoomGetInfoByIdReq, opts ...liverpc.CallOption) (*RoomGetInfoByIdResp, error) {
|
||
|
out := new(RoomGetInfoByIdResp)
|
||
|
err := doRPCRequest(ctx, c.client, 1, "Room.get_info_by_id", in, out, opts)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *roomRPCClient) GetStatusInfoByUids(ctx context.Context, in *RoomGetStatusInfoByUidsReq, opts ...liverpc.CallOption) (*RoomGetStatusInfoByUidsResp, error) {
|
||
|
out := new(RoomGetStatusInfoByUidsResp)
|
||
|
err := doRPCRequest(ctx, c.client, 1, "Room.get_status_info_by_uids", in, out, opts)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *roomRPCClient) MobileRoomInit(ctx context.Context, in *RoomMobileRoomInitReq, opts ...liverpc.CallOption) (*RoomMobileRoomInitResp, error) {
|
||
|
out := new(RoomMobileRoomInitResp)
|
||
|
err := doRPCRequest(ctx, c.client, 1, "Room.mobileRoomInit", in, out, opts)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *roomRPCClient) IncrDanmuSendNum(ctx context.Context, in *RoomIncrDanmuSendNumReq, opts ...liverpc.CallOption) (*RoomIncrDanmuSendNumResp, error) {
|
||
|
out := new(RoomIncrDanmuSendNumResp)
|
||
|
err := doRPCRequest(ctx, c.client, 1, "Room.incrDanmuSendNum", in, out, opts)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|