api.bm.go 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. // Code generated by protoc-gen-bm v0.1, DO NOT EDIT.
  2. // source: api.proto
  3. /*
  4. Package v0 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 v0
  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 PathCreateDataCreateCacheList = "/live.daoanchor.v0.CreateData/CreateCacheList"
  20. var PathCreateDataCreateLiveCacheList = "/live.daoanchor.v0.CreateData/CreateLiveCacheList"
  21. var PathCreateDataGetContentMap = "/live.daoanchor.v0.CreateData/GetContentMap"
  22. var PathCreateDataCreateDBData = "/live.daoanchor.v0.CreateData/CreateDBData"
  23. var PathPopularityGetAnchorGradeList = "/live.daoanchor.v0.Popularity/GetAnchorGradeList"
  24. var PathPopularityEditAnchorGrade = "/live.daoanchor.v0.Popularity/EditAnchorGrade"
  25. var PathPopularityGetContentList = "/live.daoanchor.v0.Popularity/GetContentList"
  26. var PathPopularityAddContent = "/live.daoanchor.v0.Popularity/AddContent"
  27. var PathPopularityEditContent = "/live.daoanchor.v0.Popularity/EditContent"
  28. var PathPopularityDeleteContent = "/live.daoanchor.v0.Popularity/DeleteContent"
  29. // ====================
  30. // CreateData Interface
  31. // ====================
  32. type CreateDataBMServer interface {
  33. // CreateCacheList 生成历史数据缓存列表
  34. CreateCacheList(ctx context.Context, req *CreateCacheListReq) (resp *CreateCacheListResp, err error)
  35. // CreateLiveCacheList 生成开播历史数据缓存列表
  36. CreateLiveCacheList(ctx context.Context, req *CreateLiveCacheListReq) (resp *CreateLiveCacheListResp, err error)
  37. // GetContentMap 获取需要生成历史数据的对象列表
  38. GetContentMap(ctx context.Context, req *GetContentMapReq) (resp *GetContentMapResp, err error)
  39. CreateDBData(ctx context.Context, req *CreateDBDataReq) (resp *CreateDBDataResp, err error)
  40. }
  41. var v0CreateDataSvc CreateDataBMServer
  42. func createDataCreateCacheList(c *bm.Context) {
  43. p := new(CreateCacheListReq)
  44. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  45. return
  46. }
  47. resp, err := v0CreateDataSvc.CreateCacheList(c, p)
  48. c.JSON(resp, err)
  49. }
  50. func createDataCreateLiveCacheList(c *bm.Context) {
  51. p := new(CreateLiveCacheListReq)
  52. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  53. return
  54. }
  55. resp, err := v0CreateDataSvc.CreateLiveCacheList(c, p)
  56. c.JSON(resp, err)
  57. }
  58. func createDataGetContentMap(c *bm.Context) {
  59. p := new(GetContentMapReq)
  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 := v0CreateDataSvc.GetContentMap(c, p)
  64. c.JSON(resp, err)
  65. }
  66. func createDataCreateDBData(c *bm.Context) {
  67. p := new(CreateDBDataReq)
  68. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  69. return
  70. }
  71. resp, err := v0CreateDataSvc.CreateDBData(c, p)
  72. c.JSON(resp, err)
  73. }
  74. // RegisterCreateDataBMServer Register the blademaster route
  75. func RegisterCreateDataBMServer(e *bm.Engine, server CreateDataBMServer) {
  76. v0CreateDataSvc = server
  77. e.GET("/live.daoanchor.v0.CreateData/CreateCacheList", createDataCreateCacheList)
  78. e.GET("/live.daoanchor.v0.CreateData/CreateLiveCacheList", createDataCreateLiveCacheList)
  79. e.GET("/live.daoanchor.v0.CreateData/GetContentMap", createDataGetContentMap)
  80. e.GET("/live.daoanchor.v0.CreateData/CreateDBData", createDataCreateDBData)
  81. }
  82. // ====================
  83. // Popularity Interface
  84. // ====================
  85. // 人气相关接口
  86. type PopularityBMServer interface {
  87. // GetAnchorGradeList 获取人气值主播评级列表
  88. GetAnchorGradeList(ctx context.Context, req *GetAnchorGradeListReq) (resp *GetAnchorGradeListResp, err error)
  89. // EditAnchorGrade 编辑主播评级对应的人气值数据
  90. EditAnchorGrade(ctx context.Context, req *EditAnchorGradeReq) (resp *EditAnchorGradeResp, err error)
  91. // GetContentList 人气内容系数列表
  92. GetContentList(ctx context.Context, req *GetContentListReq) (resp *GetContentListResp, err error)
  93. // AddContent 添加内容系数
  94. AddContent(ctx context.Context, req *AddContentReq) (resp *AddContentResp, err error)
  95. // EditContent 编辑内容系数
  96. EditContent(ctx context.Context, req *EditContentReq) (resp *EditContentResp, err error)
  97. // DeleteContent 删除内容系数
  98. DeleteContent(ctx context.Context, req *DeleteContentReq) (resp *DeleteContentResp, err error)
  99. }
  100. var v0PopularitySvc PopularityBMServer
  101. func popularityGetAnchorGradeList(c *bm.Context) {
  102. p := new(GetAnchorGradeListReq)
  103. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  104. return
  105. }
  106. resp, err := v0PopularitySvc.GetAnchorGradeList(c, p)
  107. c.JSON(resp, err)
  108. }
  109. func popularityEditAnchorGrade(c *bm.Context) {
  110. p := new(EditAnchorGradeReq)
  111. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  112. return
  113. }
  114. resp, err := v0PopularitySvc.EditAnchorGrade(c, p)
  115. c.JSON(resp, err)
  116. }
  117. func popularityGetContentList(c *bm.Context) {
  118. p := new(GetContentListReq)
  119. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  120. return
  121. }
  122. resp, err := v0PopularitySvc.GetContentList(c, p)
  123. c.JSON(resp, err)
  124. }
  125. func popularityAddContent(c *bm.Context) {
  126. p := new(AddContentReq)
  127. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  128. return
  129. }
  130. resp, err := v0PopularitySvc.AddContent(c, p)
  131. c.JSON(resp, err)
  132. }
  133. func popularityEditContent(c *bm.Context) {
  134. p := new(EditContentReq)
  135. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  136. return
  137. }
  138. resp, err := v0PopularitySvc.EditContent(c, p)
  139. c.JSON(resp, err)
  140. }
  141. func popularityDeleteContent(c *bm.Context) {
  142. p := new(DeleteContentReq)
  143. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  144. return
  145. }
  146. resp, err := v0PopularitySvc.DeleteContent(c, p)
  147. c.JSON(resp, err)
  148. }
  149. // RegisterPopularityBMServer Register the blademaster route
  150. func RegisterPopularityBMServer(e *bm.Engine, server PopularityBMServer) {
  151. v0PopularitySvc = server
  152. e.GET("/live.daoanchor.v0.Popularity/GetAnchorGradeList", popularityGetAnchorGradeList)
  153. e.GET("/live.daoanchor.v0.Popularity/EditAnchorGrade", popularityEditAnchorGrade)
  154. e.GET("/live.daoanchor.v0.Popularity/GetContentList", popularityGetContentList)
  155. e.GET("/live.daoanchor.v0.Popularity/AddContent", popularityAddContent)
  156. e.GET("/live.daoanchor.v0.Popularity/EditContent", popularityEditContent)
  157. e.GET("/live.daoanchor.v0.Popularity/DeleteContent", popularityDeleteContent)
  158. }