Room.liverpc.go 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. // Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
  2. // source: v1/Room.proto
  3. package v1
  4. import context "context"
  5. import proto "github.com/golang/protobuf/proto"
  6. import "go-common/library/net/rpc/liverpc"
  7. var _ proto.Message // generate to suppress unused imports
  8. // ==============
  9. // Room Interface
  10. // ==============
  11. type RoomRPCClient interface {
  12. // * 给大数据用的全量接口
  13. //
  14. AllLiveForBigdata(ctx context.Context, req *RoomAllLiveForBigdataReq, opts ...liverpc.CallOption) (resp *RoomAllLiveForBigdataResp, err error)
  15. // * 根据房间id获取房间信息
  16. //
  17. GetInfoById(ctx context.Context, req *RoomGetInfoByIdReq, opts ...liverpc.CallOption) (resp *RoomGetInfoByIdResp, err error)
  18. // * uid获取房间信息
  19. //
  20. GetStatusInfoByUids(ctx context.Context, req *RoomGetStatusInfoByUidsReq, opts ...liverpc.CallOption) (resp *RoomGetStatusInfoByUidsResp, err error)
  21. // * 获取移动端房间页初始化信息
  22. //
  23. MobileRoomInit(ctx context.Context, req *RoomMobileRoomInitReq, opts ...liverpc.CallOption) (resp *RoomMobileRoomInitResp, err error)
  24. // * 房间发送弹幕数累加
  25. //
  26. IncrDanmuSendNum(ctx context.Context, req *RoomIncrDanmuSendNumReq, opts ...liverpc.CallOption) (resp *RoomIncrDanmuSendNumResp, err error)
  27. }
  28. // ====================
  29. // Room Live Rpc Client
  30. // ====================
  31. type roomRPCClient struct {
  32. client *liverpc.Client
  33. }
  34. // NewRoomRPCClient creates a client that implements the RoomRPCClient interface.
  35. func NewRoomRPCClient(client *liverpc.Client) RoomRPCClient {
  36. return &roomRPCClient{
  37. client: client,
  38. }
  39. }
  40. func (c *roomRPCClient) AllLiveForBigdata(ctx context.Context, in *RoomAllLiveForBigdataReq, opts ...liverpc.CallOption) (*RoomAllLiveForBigdataResp, error) {
  41. out := new(RoomAllLiveForBigdataResp)
  42. err := doRPCRequest(ctx, c.client, 1, "Room.all_live_for_bigdata", in, out, opts)
  43. if err != nil {
  44. return nil, err
  45. }
  46. return out, nil
  47. }
  48. func (c *roomRPCClient) GetInfoById(ctx context.Context, in *RoomGetInfoByIdReq, opts ...liverpc.CallOption) (*RoomGetInfoByIdResp, error) {
  49. out := new(RoomGetInfoByIdResp)
  50. err := doRPCRequest(ctx, c.client, 1, "Room.get_info_by_id", in, out, opts)
  51. if err != nil {
  52. return nil, err
  53. }
  54. return out, nil
  55. }
  56. func (c *roomRPCClient) GetStatusInfoByUids(ctx context.Context, in *RoomGetStatusInfoByUidsReq, opts ...liverpc.CallOption) (*RoomGetStatusInfoByUidsResp, error) {
  57. out := new(RoomGetStatusInfoByUidsResp)
  58. err := doRPCRequest(ctx, c.client, 1, "Room.get_status_info_by_uids", in, out, opts)
  59. if err != nil {
  60. return nil, err
  61. }
  62. return out, nil
  63. }
  64. func (c *roomRPCClient) MobileRoomInit(ctx context.Context, in *RoomMobileRoomInitReq, opts ...liverpc.CallOption) (*RoomMobileRoomInitResp, error) {
  65. out := new(RoomMobileRoomInitResp)
  66. err := doRPCRequest(ctx, c.client, 1, "Room.mobileRoomInit", in, out, opts)
  67. if err != nil {
  68. return nil, err
  69. }
  70. return out, nil
  71. }
  72. func (c *roomRPCClient) IncrDanmuSendNum(ctx context.Context, in *RoomIncrDanmuSendNumReq, opts ...liverpc.CallOption) (*RoomIncrDanmuSendNumResp, error) {
  73. out := new(RoomIncrDanmuSendNumResp)
  74. err := doRPCRequest(ctx, c.client, 1, "Room.incrDanmuSendNum", in, out, opts)
  75. if err != nil {
  76. return nil, err
  77. }
  78. return out, nil
  79. }