AppIndex.liverpc.go 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. // Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
  2. // source: v2/AppIndex.proto
  3. /*
  4. Package v2 is a generated liverpc stub package.
  5. This code was generated with go-common/app/tool/liverpc/protoc-gen-liverpc v0.1.
  6. It is generated from these files:
  7. v2/AppIndex.proto
  8. v2/Room.proto
  9. */
  10. package v2
  11. import context "context"
  12. import proto "github.com/golang/protobuf/proto"
  13. import "go-common/library/net/rpc/liverpc"
  14. var _ proto.Message // generate to suppress unused imports
  15. // Imports only used by utility functions:
  16. // ==================
  17. // AppIndex Interface
  18. // ==================
  19. type AppIndexRPCClient interface {
  20. // * 全部列表数据
  21. //
  22. GetAllList(ctx context.Context, req *AppIndexGetAllListReq, opts ...liverpc.CallOption) (resp *AppIndexGetAllListResp, err error)
  23. // * 全部模块基础信息 5.35网关层调用
  24. //
  25. GetBaseMInfoList(ctx context.Context, req *AppIndexGetBaseMInfoListReq, opts ...liverpc.CallOption) (resp *AppIndexGetBaseMInfoListResp, err error)
  26. // * 根据moduleId查common房间列表(for app-interface 5.35+), 包括运营分区、一级分区、推荐(通用RoomList类的)
  27. //
  28. GetRoomListByIds(ctx context.Context, req *AppIndexGetRoomListByIdsReq, opts ...liverpc.CallOption) (resp *AppIndexGetRoomListByIdsResp, err error)
  29. // * 根据moduleId查common房间列表(for app-interface 5.35+), 包括分区入口(通用picList类的)
  30. //
  31. GetPicListByIds(ctx context.Context, req *AppIndexGetPicListByIdsReq, opts ...liverpc.CallOption) (resp *AppIndexGetPicListByIdsResp, err error)
  32. // * 首页banner
  33. //
  34. GetIndexBanner(ctx context.Context, req *AppIndexGetIndexBannerReq, opts ...liverpc.CallOption) (resp *AppIndexGetIndexBannerResp, err error)
  35. // * 全部列表原始数据 for app-interface 5.33+
  36. //
  37. GetAllRawList(ctx context.Context, req *AppIndexGetAllRawListReq, opts ...liverpc.CallOption) (resp *AppIndexGetAllRawListResp, err error)
  38. // * 5.32+获取多个分区房间列表-对推荐第一刷去重
  39. //
  40. GetMultiRoomList(ctx context.Context, req *AppIndexGetMultiRoomListReq, opts ...liverpc.CallOption) (resp *AppIndexGetMultiRoomListResp, err error)
  41. // * 获取活动信息
  42. // go网关层调
  43. GetActivityCard(ctx context.Context, req *AppIndexGetActivityCardReq, opts ...liverpc.CallOption) (resp *AppIndexGetActivityCardResp, err error)
  44. }
  45. // ========================
  46. // AppIndex Live Rpc Client
  47. // ========================
  48. type appIndexRPCClient struct {
  49. client *liverpc.Client
  50. }
  51. // NewAppIndexRPCClient creates a client that implements the AppIndexRPCClient interface.
  52. func NewAppIndexRPCClient(client *liverpc.Client) AppIndexRPCClient {
  53. return &appIndexRPCClient{
  54. client: client,
  55. }
  56. }
  57. func (c *appIndexRPCClient) GetAllList(ctx context.Context, in *AppIndexGetAllListReq, opts ...liverpc.CallOption) (*AppIndexGetAllListResp, error) {
  58. out := new(AppIndexGetAllListResp)
  59. err := doRPCRequest(ctx, c.client, 2, "AppIndex.getAllList", in, out, opts)
  60. if err != nil {
  61. return nil, err
  62. }
  63. return out, nil
  64. }
  65. func (c *appIndexRPCClient) GetBaseMInfoList(ctx context.Context, in *AppIndexGetBaseMInfoListReq, opts ...liverpc.CallOption) (*AppIndexGetBaseMInfoListResp, error) {
  66. out := new(AppIndexGetBaseMInfoListResp)
  67. err := doRPCRequest(ctx, c.client, 2, "AppIndex.getBaseMInfoList", in, out, opts)
  68. if err != nil {
  69. return nil, err
  70. }
  71. return out, nil
  72. }
  73. func (c *appIndexRPCClient) GetRoomListByIds(ctx context.Context, in *AppIndexGetRoomListByIdsReq, opts ...liverpc.CallOption) (*AppIndexGetRoomListByIdsResp, error) {
  74. out := new(AppIndexGetRoomListByIdsResp)
  75. err := doRPCRequest(ctx, c.client, 2, "AppIndex.getRoomListByIds", in, out, opts)
  76. if err != nil {
  77. return nil, err
  78. }
  79. return out, nil
  80. }
  81. func (c *appIndexRPCClient) GetPicListByIds(ctx context.Context, in *AppIndexGetPicListByIdsReq, opts ...liverpc.CallOption) (*AppIndexGetPicListByIdsResp, error) {
  82. out := new(AppIndexGetPicListByIdsResp)
  83. err := doRPCRequest(ctx, c.client, 2, "AppIndex.getPicListByIds", in, out, opts)
  84. if err != nil {
  85. return nil, err
  86. }
  87. return out, nil
  88. }
  89. func (c *appIndexRPCClient) GetIndexBanner(ctx context.Context, in *AppIndexGetIndexBannerReq, opts ...liverpc.CallOption) (*AppIndexGetIndexBannerResp, error) {
  90. out := new(AppIndexGetIndexBannerResp)
  91. err := doRPCRequest(ctx, c.client, 2, "AppIndex.getIndexBanner", in, out, opts)
  92. if err != nil {
  93. return nil, err
  94. }
  95. return out, nil
  96. }
  97. func (c *appIndexRPCClient) GetAllRawList(ctx context.Context, in *AppIndexGetAllRawListReq, opts ...liverpc.CallOption) (*AppIndexGetAllRawListResp, error) {
  98. out := new(AppIndexGetAllRawListResp)
  99. err := doRPCRequest(ctx, c.client, 2, "AppIndex.getAllRawList", in, out, opts)
  100. if err != nil {
  101. return nil, err
  102. }
  103. return out, nil
  104. }
  105. func (c *appIndexRPCClient) GetMultiRoomList(ctx context.Context, in *AppIndexGetMultiRoomListReq, opts ...liverpc.CallOption) (*AppIndexGetMultiRoomListResp, error) {
  106. out := new(AppIndexGetMultiRoomListResp)
  107. err := doRPCRequest(ctx, c.client, 2, "AppIndex.getMultiRoomList", in, out, opts)
  108. if err != nil {
  109. return nil, err
  110. }
  111. return out, nil
  112. }
  113. func (c *appIndexRPCClient) GetActivityCard(ctx context.Context, in *AppIndexGetActivityCardReq, opts ...liverpc.CallOption) (*AppIndexGetActivityCardResp, error) {
  114. out := new(AppIndexGetActivityCardResp)
  115. err := doRPCRequest(ctx, c.client, 2, "AppIndex.getActivityCard", in, out, opts)
  116. if err != nil {
  117. return nil, err
  118. }
  119. return out, nil
  120. }
  121. // =====
  122. // Utils
  123. // =====
  124. func doRPCRequest(ctx context.Context, client *liverpc.Client, version int, method string, in, out proto.Message, opts []liverpc.CallOption) (err error) {
  125. err = client.Call(ctx, version, method, in, out, opts...)
  126. return
  127. }