api.bm.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. // Code generated by protoc-gen-bm v0.1, DO NOT EDIT.
  2. // source: 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.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. var PathDaoAnchorFetchRoomByIDs = "/live.daoanchor.v1.DaoAnchor/FetchRoomByIDs"
  20. var PathDaoAnchorRoomOnlineList = "/live.daoanchor.v1.DaoAnchor/RoomOnlineList"
  21. var PathDaoAnchorRoomOnlineListByArea = "/live.daoanchor.v1.DaoAnchor/RoomOnlineListByArea"
  22. var PathDaoAnchorRoomOnlineListByAttrs = "/live.daoanchor.v1.DaoAnchor/RoomOnlineListByAttrs"
  23. var PathDaoAnchorRoomCreate = "/live.daoanchor.v1.DaoAnchor/RoomCreate"
  24. var PathDaoAnchorRoomUpdate = "/live.daoanchor.v1.DaoAnchor/RoomUpdate"
  25. var PathDaoAnchorRoomBatchUpdate = "/live.daoanchor.v1.DaoAnchor/RoomBatchUpdate"
  26. var PathDaoAnchorRoomExtendUpdate = "/live.daoanchor.v1.DaoAnchor/RoomExtendUpdate"
  27. var PathDaoAnchorRoomExtendBatchUpdate = "/live.daoanchor.v1.DaoAnchor/RoomExtendBatchUpdate"
  28. var PathDaoAnchorRoomExtendIncre = "/live.daoanchor.v1.DaoAnchor/RoomExtendIncre"
  29. var PathDaoAnchorRoomExtendBatchIncre = "/live.daoanchor.v1.DaoAnchor/RoomExtendBatchIncre"
  30. var PathDaoAnchorRoomTagCreate = "/live.daoanchor.v1.DaoAnchor/RoomTagCreate"
  31. var PathDaoAnchorRoomAttrCreate = "/live.daoanchor.v1.DaoAnchor/RoomAttrCreate"
  32. var PathDaoAnchorRoomAttrSetEx = "/live.daoanchor.v1.DaoAnchor/RoomAttrSetEx"
  33. var PathDaoAnchorAnchorUpdate = "/live.daoanchor.v1.DaoAnchor/AnchorUpdate"
  34. var PathDaoAnchorAnchorBatchUpdate = "/live.daoanchor.v1.DaoAnchor/AnchorBatchUpdate"
  35. var PathDaoAnchorAnchorIncre = "/live.daoanchor.v1.DaoAnchor/AnchorIncre"
  36. var PathDaoAnchorAnchorBatchIncre = "/live.daoanchor.v1.DaoAnchor/AnchorBatchIncre"
  37. var PathDaoAnchorFetchAreas = "/live.daoanchor.v1.DaoAnchor/FetchAreas"
  38. var PathDaoAnchorFetchAttrByIDs = "/live.daoanchor.v1.DaoAnchor/FetchAttrByIDs"
  39. var PathDaoAnchorDeleteAttr = "/live.daoanchor.v1.DaoAnchor/DeleteAttr"
  40. // ===================
  41. // DaoAnchor Interface
  42. // ===================
  43. type DaoAnchorBMServer interface {
  44. // FetchRoomByIDs 查询房间信息
  45. FetchRoomByIDs(ctx context.Context, req *RoomByIDsReq) (resp *RoomByIDsResp, err error)
  46. // RoomOnlineList 在线房间列表
  47. RoomOnlineList(ctx context.Context, req *RoomOnlineListReq) (resp *RoomOnlineListResp, err error)
  48. // RoomOnlineListByArea 分区在线房间列表(只返回room_id列表,不传分区,默认查找所有)
  49. RoomOnlineListByArea(ctx context.Context, req *RoomOnlineListByAreaReq) (resp *RoomOnlineListByAreaResp, err error)
  50. // RoomOnlineListByAttrs 在线房间维度信息(不传attrs,不查询attr)
  51. RoomOnlineListByAttrs(ctx context.Context, req *RoomOnlineListByAttrsReq) (resp *RoomOnlineListByAttrsResp, err error)
  52. // RoomCreate 房间创建
  53. RoomCreate(ctx context.Context, req *RoomCreateReq) (resp *RoomCreateResp, err error)
  54. // RoomUpdate 房间信息更新
  55. RoomUpdate(ctx context.Context, req *RoomUpdateReq) (resp *UpdateResp, err error)
  56. // RoomBatchUpdate 房间信息批量更新
  57. RoomBatchUpdate(ctx context.Context, req *RoomBatchUpdateReq) (resp *UpdateResp, err error)
  58. // RoomExtendUpdate 房间扩展信息更新
  59. RoomExtendUpdate(ctx context.Context, req *RoomExtendUpdateReq) (resp *UpdateResp, err error)
  60. // RoomExtendBatchUpdate 房间扩展信息批量更新
  61. RoomExtendBatchUpdate(ctx context.Context, req *RoomExtendBatchUpdateReq) (resp *UpdateResp, err error)
  62. // RoomExtendIncre 房间信息增量更新
  63. RoomExtendIncre(ctx context.Context, req *RoomExtendIncreReq) (resp *UpdateResp, err error)
  64. // RoomExtendBatchIncre 房间信息批量增量更新
  65. RoomExtendBatchIncre(ctx context.Context, req *RoomExtendBatchIncreReq) (resp *UpdateResp, err error)
  66. // RoomTagCreate 房间Tag创建
  67. RoomTagCreate(ctx context.Context, req *RoomTagCreateReq) (resp *UpdateResp, err error)
  68. // RoomAttrCreate 房间Attr创建
  69. RoomAttrCreate(ctx context.Context, req *RoomAttrCreateReq) (resp *UpdateResp, err error)
  70. // RoomAttrSetEx 房间Attr更新
  71. RoomAttrSetEx(ctx context.Context, req *RoomAttrSetExReq) (resp *UpdateResp, err error)
  72. // AnchorUpdate 主播信息更新
  73. AnchorUpdate(ctx context.Context, req *AnchorUpdateReq) (resp *UpdateResp, err error)
  74. // AnchorBatchUpdate 主播信息批量更新
  75. AnchorBatchUpdate(ctx context.Context, req *AnchorBatchUpdateReq) (resp *UpdateResp, err error)
  76. // AnchorIncre 主播信息增量更新
  77. AnchorIncre(ctx context.Context, req *AnchorIncreReq) (resp *UpdateResp, err error)
  78. // AnchorBatchIncre 主播信息批量增量更新
  79. AnchorBatchIncre(ctx context.Context, req *AnchorBatchIncreReq) (resp *UpdateResp, err error)
  80. // FetchAreas 根据父分区号查询子分区
  81. FetchAreas(ctx context.Context, req *FetchAreasReq) (resp *FetchAreasResp, err error)
  82. // FetchAttrByIDs 批量根据房间号查询指标
  83. FetchAttrByIDs(ctx context.Context, req *FetchAttrByIDsReq) (resp *FetchAttrByIDsResp, err error)
  84. // DeleteAttr 删除某一个指标
  85. DeleteAttr(ctx context.Context, req *DeleteAttrReq) (resp *UpdateResp, err error)
  86. }
  87. var v1DaoAnchorSvc DaoAnchorBMServer
  88. func daoAnchorFetchRoomByIDs(c *bm.Context) {
  89. p := new(RoomByIDsReq)
  90. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  91. return
  92. }
  93. resp, err := v1DaoAnchorSvc.FetchRoomByIDs(c, p)
  94. c.JSON(resp, err)
  95. }
  96. func daoAnchorRoomOnlineList(c *bm.Context) {
  97. p := new(RoomOnlineListReq)
  98. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  99. return
  100. }
  101. resp, err := v1DaoAnchorSvc.RoomOnlineList(c, p)
  102. c.JSON(resp, err)
  103. }
  104. func daoAnchorRoomOnlineListByArea(c *bm.Context) {
  105. p := new(RoomOnlineListByAreaReq)
  106. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  107. return
  108. }
  109. resp, err := v1DaoAnchorSvc.RoomOnlineListByArea(c, p)
  110. c.JSON(resp, err)
  111. }
  112. func daoAnchorRoomOnlineListByAttrs(c *bm.Context) {
  113. p := new(RoomOnlineListByAttrsReq)
  114. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  115. return
  116. }
  117. resp, err := v1DaoAnchorSvc.RoomOnlineListByAttrs(c, p)
  118. c.JSON(resp, err)
  119. }
  120. func daoAnchorRoomCreate(c *bm.Context) {
  121. p := new(RoomCreateReq)
  122. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  123. return
  124. }
  125. resp, err := v1DaoAnchorSvc.RoomCreate(c, p)
  126. c.JSON(resp, err)
  127. }
  128. func daoAnchorRoomUpdate(c *bm.Context) {
  129. p := new(RoomUpdateReq)
  130. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  131. return
  132. }
  133. resp, err := v1DaoAnchorSvc.RoomUpdate(c, p)
  134. c.JSON(resp, err)
  135. }
  136. func daoAnchorRoomBatchUpdate(c *bm.Context) {
  137. p := new(RoomBatchUpdateReq)
  138. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  139. return
  140. }
  141. resp, err := v1DaoAnchorSvc.RoomBatchUpdate(c, p)
  142. c.JSON(resp, err)
  143. }
  144. func daoAnchorRoomExtendUpdate(c *bm.Context) {
  145. p := new(RoomExtendUpdateReq)
  146. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  147. return
  148. }
  149. resp, err := v1DaoAnchorSvc.RoomExtendUpdate(c, p)
  150. c.JSON(resp, err)
  151. }
  152. func daoAnchorRoomExtendBatchUpdate(c *bm.Context) {
  153. p := new(RoomExtendBatchUpdateReq)
  154. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  155. return
  156. }
  157. resp, err := v1DaoAnchorSvc.RoomExtendBatchUpdate(c, p)
  158. c.JSON(resp, err)
  159. }
  160. func daoAnchorRoomExtendIncre(c *bm.Context) {
  161. p := new(RoomExtendIncreReq)
  162. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  163. return
  164. }
  165. resp, err := v1DaoAnchorSvc.RoomExtendIncre(c, p)
  166. c.JSON(resp, err)
  167. }
  168. func daoAnchorRoomExtendBatchIncre(c *bm.Context) {
  169. p := new(RoomExtendBatchIncreReq)
  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 := v1DaoAnchorSvc.RoomExtendBatchIncre(c, p)
  174. c.JSON(resp, err)
  175. }
  176. func daoAnchorRoomTagCreate(c *bm.Context) {
  177. p := new(RoomTagCreateReq)
  178. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  179. return
  180. }
  181. resp, err := v1DaoAnchorSvc.RoomTagCreate(c, p)
  182. c.JSON(resp, err)
  183. }
  184. func daoAnchorRoomAttrCreate(c *bm.Context) {
  185. p := new(RoomAttrCreateReq)
  186. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  187. return
  188. }
  189. resp, err := v1DaoAnchorSvc.RoomAttrCreate(c, p)
  190. c.JSON(resp, err)
  191. }
  192. func daoAnchorRoomAttrSetEx(c *bm.Context) {
  193. p := new(RoomAttrSetExReq)
  194. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  195. return
  196. }
  197. resp, err := v1DaoAnchorSvc.RoomAttrSetEx(c, p)
  198. c.JSON(resp, err)
  199. }
  200. func daoAnchorAnchorUpdate(c *bm.Context) {
  201. p := new(AnchorUpdateReq)
  202. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  203. return
  204. }
  205. resp, err := v1DaoAnchorSvc.AnchorUpdate(c, p)
  206. c.JSON(resp, err)
  207. }
  208. func daoAnchorAnchorBatchUpdate(c *bm.Context) {
  209. p := new(AnchorBatchUpdateReq)
  210. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  211. return
  212. }
  213. resp, err := v1DaoAnchorSvc.AnchorBatchUpdate(c, p)
  214. c.JSON(resp, err)
  215. }
  216. func daoAnchorAnchorIncre(c *bm.Context) {
  217. p := new(AnchorIncreReq)
  218. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  219. return
  220. }
  221. resp, err := v1DaoAnchorSvc.AnchorIncre(c, p)
  222. c.JSON(resp, err)
  223. }
  224. func daoAnchorAnchorBatchIncre(c *bm.Context) {
  225. p := new(AnchorBatchIncreReq)
  226. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  227. return
  228. }
  229. resp, err := v1DaoAnchorSvc.AnchorBatchIncre(c, p)
  230. c.JSON(resp, err)
  231. }
  232. func daoAnchorFetchAreas(c *bm.Context) {
  233. p := new(FetchAreasReq)
  234. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  235. return
  236. }
  237. resp, err := v1DaoAnchorSvc.FetchAreas(c, p)
  238. c.JSON(resp, err)
  239. }
  240. func daoAnchorFetchAttrByIDs(c *bm.Context) {
  241. p := new(FetchAttrByIDsReq)
  242. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  243. return
  244. }
  245. resp, err := v1DaoAnchorSvc.FetchAttrByIDs(c, p)
  246. c.JSON(resp, err)
  247. }
  248. func daoAnchorDeleteAttr(c *bm.Context) {
  249. p := new(DeleteAttrReq)
  250. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  251. return
  252. }
  253. resp, err := v1DaoAnchorSvc.DeleteAttr(c, p)
  254. c.JSON(resp, err)
  255. }
  256. // RegisterDaoAnchorBMServer Register the blademaster route
  257. func RegisterDaoAnchorBMServer(e *bm.Engine, server DaoAnchorBMServer) {
  258. v1DaoAnchorSvc = server
  259. e.GET("/live.daoanchor.v1.DaoAnchor/FetchRoomByIDs", daoAnchorFetchRoomByIDs)
  260. e.GET("/live.daoanchor.v1.DaoAnchor/RoomOnlineList", daoAnchorRoomOnlineList)
  261. e.GET("/live.daoanchor.v1.DaoAnchor/RoomOnlineListByArea", daoAnchorRoomOnlineListByArea)
  262. e.GET("/live.daoanchor.v1.DaoAnchor/RoomOnlineListByAttrs", daoAnchorRoomOnlineListByAttrs)
  263. e.GET("/live.daoanchor.v1.DaoAnchor/RoomCreate", daoAnchorRoomCreate)
  264. e.GET("/live.daoanchor.v1.DaoAnchor/RoomUpdate", daoAnchorRoomUpdate)
  265. e.GET("/live.daoanchor.v1.DaoAnchor/RoomBatchUpdate", daoAnchorRoomBatchUpdate)
  266. e.GET("/live.daoanchor.v1.DaoAnchor/RoomExtendUpdate", daoAnchorRoomExtendUpdate)
  267. e.GET("/live.daoanchor.v1.DaoAnchor/RoomExtendBatchUpdate", daoAnchorRoomExtendBatchUpdate)
  268. e.GET("/live.daoanchor.v1.DaoAnchor/RoomExtendIncre", daoAnchorRoomExtendIncre)
  269. e.GET("/live.daoanchor.v1.DaoAnchor/RoomExtendBatchIncre", daoAnchorRoomExtendBatchIncre)
  270. e.GET("/live.daoanchor.v1.DaoAnchor/RoomTagCreate", daoAnchorRoomTagCreate)
  271. e.GET("/live.daoanchor.v1.DaoAnchor/RoomAttrCreate", daoAnchorRoomAttrCreate)
  272. e.GET("/live.daoanchor.v1.DaoAnchor/RoomAttrSetEx", daoAnchorRoomAttrSetEx)
  273. e.GET("/live.daoanchor.v1.DaoAnchor/AnchorUpdate", daoAnchorAnchorUpdate)
  274. e.GET("/live.daoanchor.v1.DaoAnchor/AnchorBatchUpdate", daoAnchorAnchorBatchUpdate)
  275. e.GET("/live.daoanchor.v1.DaoAnchor/AnchorIncre", daoAnchorAnchorIncre)
  276. e.GET("/live.daoanchor.v1.DaoAnchor/AnchorBatchIncre", daoAnchorAnchorBatchIncre)
  277. e.GET("/live.daoanchor.v1.DaoAnchor/FetchAreas", daoAnchorFetchAreas)
  278. e.GET("/live.daoanchor.v1.DaoAnchor/FetchAttrByIDs", daoAnchorFetchAttrByIDs)
  279. e.GET("/live.daoanchor.v1.DaoAnchor/DeleteAttr", daoAnchorDeleteAttr)
  280. }