api.bm.go 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. // Code generated by protoc-gen-bm v0.1, DO NOT EDIT.
  2. // source: api/grpc/v1/api.proto
  3. /*
  4. Package v1 is a generated blademaster stub package.
  5. This code was generated with go-common/app/tool/bmgen/protoc-gen-bm v0.1.
  6. It is generated from these files:
  7. api/grpc/v1/api.proto
  8. */
  9. package v1
  10. import (
  11. "context"
  12. bm "go-common/library/net/http/blademaster"
  13. "go-common/library/net/http/blademaster/binding"
  14. )
  15. // to suppressed 'imported but not used warning'
  16. var _ *bm.Context
  17. var _ context.Context
  18. var _ binding.StructValidator
  19. // =================
  20. // XAnchor Interface
  21. // =================
  22. type XAnchor interface {
  23. // FetchRoomByIDs 查询房间信息
  24. FetchRoomByIDs(ctx context.Context, req *RoomByIDsReq) (resp *RoomByIDsResp, err error)
  25. // RoomOnlineList 在线房间列表
  26. RoomOnlineList(ctx context.Context, req *RoomOnlineListReq) (resp *RoomOnlineListResp, err error)
  27. // RoomCreate 房间创建
  28. RoomCreate(ctx context.Context, req *RoomCreateReq) (resp *RoomCreateResp, err error)
  29. // RoomUpdate 房间信息更新
  30. RoomUpdate(ctx context.Context, req *RoomUpdateReq) (resp *UpdateResp, err error)
  31. // RoomBatchUpdate 房间信息批量更新
  32. RoomBatchUpdate(ctx context.Context, req *RoomBatchUpdateReq) (resp *UpdateResp, err error)
  33. // RoomExtendUpdate 房间扩展信息更新
  34. RoomExtendUpdate(ctx context.Context, req *RoomExtendUpdateReq) (resp *UpdateResp, err error)
  35. // RoomExtendBatchUpdate 房间扩展信息批量更新
  36. RoomExtendBatchUpdate(ctx context.Context, req *RoomExtendBatchUpdateReq) (resp *UpdateResp, err error)
  37. // RoomExtendIncre 房间信息增量更新
  38. RoomExtendIncre(ctx context.Context, req *RoomExtendIncreReq) (resp *UpdateResp, err error)
  39. // RoomExtendBatchIncre 房间信息批量增量更新
  40. RoomExtendBatchIncre(ctx context.Context, req *RoomExtendBatchIncreReq) (resp *UpdateResp, err error)
  41. // RoomTagSet 房间Tag更新
  42. RoomTagSet(ctx context.Context, req *RoomTagSetReq) (resp *UpdateResp, err error)
  43. // AnchorUpdate 主播信息更新
  44. AnchorUpdate(ctx context.Context, req *AnchorUpdateReq) (resp *UpdateResp, err error)
  45. // AnchorBatchUpdate 主播信息批量更新
  46. AnchorBatchUpdate(ctx context.Context, req *AnchorBatchUpdateReq) (resp *UpdateResp, err error)
  47. // AnchorIncre 主播信息增量更新
  48. AnchorIncre(ctx context.Context, req *AnchorIncreReq) (resp *UpdateResp, err error)
  49. // AnchorBatchIncre 主播信息批量增量更新
  50. AnchorBatchIncre(ctx context.Context, req *AnchorBatchIncreReq) (resp *UpdateResp, err error)
  51. // AnchorTagSet 主播Tag更新
  52. AnchorTagSet(ctx context.Context, req *AnchorTagSetReq) (resp *UpdateResp, err error)
  53. }
  54. var v1XAnchorSvc XAnchor
  55. // @params RoomByIDsReq
  56. // @router GET /xlive/xanchor/v1/xAnchor/FetchRoomByIDs
  57. // @response RoomByIDsResp
  58. func xAnchorFetchRoomByIDs(c *bm.Context) {
  59. p := new(RoomByIDsReq)
  60. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  61. return
  62. }
  63. resp, err := v1XAnchorSvc.FetchRoomByIDs(c, p)
  64. c.JSON(resp, err)
  65. }
  66. // @params RoomOnlineListReq
  67. // @router GET /xlive/xanchor/v1/xAnchor/RoomOnlineList
  68. // @response RoomOnlineListResp
  69. func xAnchorRoomOnlineList(c *bm.Context) {
  70. p := new(RoomOnlineListReq)
  71. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  72. return
  73. }
  74. resp, err := v1XAnchorSvc.RoomOnlineList(c, p)
  75. c.JSON(resp, err)
  76. }
  77. // @params RoomCreateReq
  78. // @router GET /xlive/xanchor/v1/xAnchor/RoomCreate
  79. // @response RoomCreateResp
  80. func xAnchorRoomCreate(c *bm.Context) {
  81. p := new(RoomCreateReq)
  82. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  83. return
  84. }
  85. resp, err := v1XAnchorSvc.RoomCreate(c, p)
  86. c.JSON(resp, err)
  87. }
  88. // @params RoomUpdateReq
  89. // @router GET /xlive/xanchor/v1/xAnchor/RoomUpdate
  90. // @response UpdateResp
  91. func xAnchorRoomUpdate(c *bm.Context) {
  92. p := new(RoomUpdateReq)
  93. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  94. return
  95. }
  96. resp, err := v1XAnchorSvc.RoomUpdate(c, p)
  97. c.JSON(resp, err)
  98. }
  99. // @params RoomBatchUpdateReq
  100. // @router GET /xlive/xanchor/v1/xAnchor/RoomBatchUpdate
  101. // @response UpdateResp
  102. func xAnchorRoomBatchUpdate(c *bm.Context) {
  103. p := new(RoomBatchUpdateReq)
  104. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  105. return
  106. }
  107. resp, err := v1XAnchorSvc.RoomBatchUpdate(c, p)
  108. c.JSON(resp, err)
  109. }
  110. // @params RoomExtendUpdateReq
  111. // @router GET /xlive/xanchor/v1/xAnchor/RoomExtendUpdate
  112. // @response UpdateResp
  113. func xAnchorRoomExtendUpdate(c *bm.Context) {
  114. p := new(RoomExtendUpdateReq)
  115. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  116. return
  117. }
  118. resp, err := v1XAnchorSvc.RoomExtendUpdate(c, p)
  119. c.JSON(resp, err)
  120. }
  121. // @params RoomExtendBatchUpdateReq
  122. // @router GET /xlive/xanchor/v1/xAnchor/RoomExtendBatchUpdate
  123. // @response UpdateResp
  124. func xAnchorRoomExtendBatchUpdate(c *bm.Context) {
  125. p := new(RoomExtendBatchUpdateReq)
  126. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  127. return
  128. }
  129. resp, err := v1XAnchorSvc.RoomExtendBatchUpdate(c, p)
  130. c.JSON(resp, err)
  131. }
  132. // @params RoomExtendIncreReq
  133. // @router GET /xlive/xanchor/v1/xAnchor/RoomExtendIncre
  134. // @response UpdateResp
  135. func xAnchorRoomExtendIncre(c *bm.Context) {
  136. p := new(RoomExtendIncreReq)
  137. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  138. return
  139. }
  140. resp, err := v1XAnchorSvc.RoomExtendIncre(c, p)
  141. c.JSON(resp, err)
  142. }
  143. // @params RoomExtendBatchIncreReq
  144. // @router GET /xlive/xanchor/v1/xAnchor/RoomExtendBatchIncre
  145. // @response UpdateResp
  146. func xAnchorRoomExtendBatchIncre(c *bm.Context) {
  147. p := new(RoomExtendBatchIncreReq)
  148. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  149. return
  150. }
  151. resp, err := v1XAnchorSvc.RoomExtendBatchIncre(c, p)
  152. c.JSON(resp, err)
  153. }
  154. // @params RoomTagSetReq
  155. // @router GET /xlive/xanchor/v1/xAnchor/RoomTagSet
  156. // @response UpdateResp
  157. func xAnchorRoomTagSet(c *bm.Context) {
  158. p := new(RoomTagSetReq)
  159. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  160. return
  161. }
  162. resp, err := v1XAnchorSvc.RoomTagSet(c, p)
  163. c.JSON(resp, err)
  164. }
  165. // @params AnchorUpdateReq
  166. // @router GET /xlive/xanchor/v1/xAnchor/AnchorUpdate
  167. // @response UpdateResp
  168. func xAnchorAnchorUpdate(c *bm.Context) {
  169. p := new(AnchorUpdateReq)
  170. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  171. return
  172. }
  173. resp, err := v1XAnchorSvc.AnchorUpdate(c, p)
  174. c.JSON(resp, err)
  175. }
  176. // @params AnchorBatchUpdateReq
  177. // @router GET /xlive/xanchor/v1/xAnchor/AnchorBatchUpdate
  178. // @response UpdateResp
  179. func xAnchorAnchorBatchUpdate(c *bm.Context) {
  180. p := new(AnchorBatchUpdateReq)
  181. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  182. return
  183. }
  184. resp, err := v1XAnchorSvc.AnchorBatchUpdate(c, p)
  185. c.JSON(resp, err)
  186. }
  187. // @params AnchorIncreReq
  188. // @router GET /xlive/xanchor/v1/xAnchor/AnchorIncre
  189. // @response UpdateResp
  190. func xAnchorAnchorIncre(c *bm.Context) {
  191. p := new(AnchorIncreReq)
  192. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  193. return
  194. }
  195. resp, err := v1XAnchorSvc.AnchorIncre(c, p)
  196. c.JSON(resp, err)
  197. }
  198. // @params AnchorBatchIncreReq
  199. // @router GET /xlive/xanchor/v1/xAnchor/AnchorBatchIncre
  200. // @response UpdateResp
  201. func xAnchorAnchorBatchIncre(c *bm.Context) {
  202. p := new(AnchorBatchIncreReq)
  203. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  204. return
  205. }
  206. resp, err := v1XAnchorSvc.AnchorBatchIncre(c, p)
  207. c.JSON(resp, err)
  208. }
  209. // @params AnchorTagSetReq
  210. // @router GET /xlive/xanchor/v1/xAnchor/AnchorTagSet
  211. // @response UpdateResp
  212. func xAnchorAnchorTagSet(c *bm.Context) {
  213. p := new(AnchorTagSetReq)
  214. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  215. return
  216. }
  217. resp, err := v1XAnchorSvc.AnchorTagSet(c, p)
  218. c.JSON(resp, err)
  219. }
  220. // RegisterV1XAnchorService Register the blademaster route with middleware map
  221. // midMap is the middleware map, the key is defined in proto
  222. func RegisterV1XAnchorService(e *bm.Engine, svc XAnchor, midMap map[string]bm.HandlerFunc) {
  223. v1XAnchorSvc = svc
  224. e.GET("/xlive/xanchor/v1/xAnchor/FetchRoomByIDs", xAnchorFetchRoomByIDs)
  225. e.GET("/xlive/xanchor/v1/xAnchor/RoomOnlineList", xAnchorRoomOnlineList)
  226. e.GET("/xlive/xanchor/v1/xAnchor/RoomCreate", xAnchorRoomCreate)
  227. e.GET("/xlive/xanchor/v1/xAnchor/RoomUpdate", xAnchorRoomUpdate)
  228. e.GET("/xlive/xanchor/v1/xAnchor/RoomBatchUpdate", xAnchorRoomBatchUpdate)
  229. e.GET("/xlive/xanchor/v1/xAnchor/RoomExtendUpdate", xAnchorRoomExtendUpdate)
  230. e.GET("/xlive/xanchor/v1/xAnchor/RoomExtendBatchUpdate", xAnchorRoomExtendBatchUpdate)
  231. e.GET("/xlive/xanchor/v1/xAnchor/RoomExtendIncre", xAnchorRoomExtendIncre)
  232. e.GET("/xlive/xanchor/v1/xAnchor/RoomExtendBatchIncre", xAnchorRoomExtendBatchIncre)
  233. e.GET("/xlive/xanchor/v1/xAnchor/RoomTagSet", xAnchorRoomTagSet)
  234. e.GET("/xlive/xanchor/v1/xAnchor/AnchorUpdate", xAnchorAnchorUpdate)
  235. e.GET("/xlive/xanchor/v1/xAnchor/AnchorBatchUpdate", xAnchorAnchorBatchUpdate)
  236. e.GET("/xlive/xanchor/v1/xAnchor/AnchorIncre", xAnchorAnchorIncre)
  237. e.GET("/xlive/xanchor/v1/xAnchor/AnchorBatchIncre", xAnchorAnchorBatchIncre)
  238. e.GET("/xlive/xanchor/v1/xAnchor/AnchorTagSet", xAnchorAnchorTagSet)
  239. }