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

98 lines
3.2 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
// source: v2/Room.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
// ==============
// Room Interface
// ==============
type RoomRPCClient interface {
// * 根据房间id获取房间信息v2
// 修正原来的get_info_by_id 在传了fields字段但是不包含roomid的情况下 依然会返回所有字段, 新版修正这个问题, 只会返回指定的字段.
GetByIds(ctx context.Context, req *RoomGetByIdsReq, opts ...liverpc.CallOption) (resp *RoomGetByIdsResp, err error)
// * 从uid得到room_id
//
RoomIdByUid(ctx context.Context, req *RoomRoomIdByUidReq, opts ...liverpc.CallOption) (resp *RoomRoomIdByUidResp, err error)
// * 批量从uids得到room_ids
//
RoomIdByUidMulti(ctx context.Context, req *RoomRoomIdByUidMultiReq, opts ...liverpc.CallOption) (resp *RoomRoomIdByUidMultiResp, err error)
// * 获取所有/分区在线房间id
// 只能内部调用
GetOnlineRoomIds(ctx context.Context, req *RoomGetOnlineRoomIdsReq, opts ...liverpc.CallOption) (resp *RoomGetOnlineRoomIdsResp, err error)
// * app房间页tab v2
//
MobileTab(ctx context.Context, req *RoomMobileTabReq, opts ...liverpc.CallOption) (resp *RoomMobileTabResp, 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) GetByIds(ctx context.Context, in *RoomGetByIdsReq, opts ...liverpc.CallOption) (*RoomGetByIdsResp, error) {
out := new(RoomGetByIdsResp)
err := doRPCRequest(ctx, c.client, 2, "Room.get_by_ids", in, out, opts)
if err != nil {
return nil, err
}
return out, nil
}
func (c *roomRPCClient) RoomIdByUid(ctx context.Context, in *RoomRoomIdByUidReq, opts ...liverpc.CallOption) (*RoomRoomIdByUidResp, error) {
out := new(RoomRoomIdByUidResp)
err := doRPCRequest(ctx, c.client, 2, "Room.room_id_by_uid", in, out, opts)
if err != nil {
return nil, err
}
return out, nil
}
func (c *roomRPCClient) RoomIdByUidMulti(ctx context.Context, in *RoomRoomIdByUidMultiReq, opts ...liverpc.CallOption) (*RoomRoomIdByUidMultiResp, error) {
out := new(RoomRoomIdByUidMultiResp)
err := doRPCRequest(ctx, c.client, 2, "Room.room_id_by_uid_multi", in, out, opts)
if err != nil {
return nil, err
}
return out, nil
}
func (c *roomRPCClient) GetOnlineRoomIds(ctx context.Context, in *RoomGetOnlineRoomIdsReq, opts ...liverpc.CallOption) (*RoomGetOnlineRoomIdsResp, error) {
out := new(RoomGetOnlineRoomIdsResp)
err := doRPCRequest(ctx, c.client, 2, "Room.getOnlineRoomIds", in, out, opts)
if err != nil {
return nil, err
}
return out, nil
}
func (c *roomRPCClient) MobileTab(ctx context.Context, in *RoomMobileTabReq, opts ...liverpc.CallOption) (*RoomMobileTabResp, error) {
out := new(RoomMobileTabResp)
err := doRPCRequest(ctx, c.client, 2, "Room.mobileTab", in, out, opts)
if err != nil {
return nil, err
}
return out, nil
}