roomNotice.bm.go 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. // Code generated by protoc-gen-bm v0.1, DO NOT EDIT.
  2. // source: roomNotice.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. roomNotice.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 PathRoomNoticeBuyGuard = "/live.xuserex.v1.RoomNotice/buy_guard"
  20. var PathRoomNoticeIsTaskFinish = "/live.xuserex.v1.RoomNotice/is_task_finish"
  21. var PathRoomNoticeSetTaskFinish = "/live.xuserex.v1.RoomNotice/set_task_finish"
  22. // ====================
  23. // RoomNotice Interface
  24. // ====================
  25. // 房间提示 相关服务
  26. type RoomNoticeBMServer interface {
  27. // 是否弹出大航海购买提示
  28. BuyGuard(ctx context.Context, req *RoomNoticeBuyGuardReq) (resp *RoomNoticeBuyGuardResp, err error)
  29. // habse 任务是否结束
  30. IsTaskFinish(ctx context.Context, req *RoomNoticeIsTaskFinishReq) (resp *RoomNoticeIsTaskFinishResp, err error)
  31. // 手动设置base 任务结束
  32. SetTaskFinish(ctx context.Context, req *RoomNoticeSetTaskFinishReq) (resp *RoomNoticeSetTaskFinishResp, err error)
  33. }
  34. var v1RoomNoticeSvc RoomNoticeBMServer
  35. func roomNoticeBuyGuard(c *bm.Context) {
  36. p := new(RoomNoticeBuyGuardReq)
  37. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  38. return
  39. }
  40. resp, err := v1RoomNoticeSvc.BuyGuard(c, p)
  41. c.JSON(resp, err)
  42. }
  43. func roomNoticeIsTaskFinish(c *bm.Context) {
  44. p := new(RoomNoticeIsTaskFinishReq)
  45. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  46. return
  47. }
  48. resp, err := v1RoomNoticeSvc.IsTaskFinish(c, p)
  49. c.JSON(resp, err)
  50. }
  51. func roomNoticeSetTaskFinish(c *bm.Context) {
  52. p := new(RoomNoticeSetTaskFinishReq)
  53. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  54. return
  55. }
  56. resp, err := v1RoomNoticeSvc.SetTaskFinish(c, p)
  57. c.JSON(resp, err)
  58. }
  59. // RegisterRoomNoticeBMServer Register the blademaster route
  60. func RegisterRoomNoticeBMServer(e *bm.Engine, server RoomNoticeBMServer) {
  61. v1RoomNoticeSvc = server
  62. e.GET("/live.xuserex.v1.RoomNotice/buy_guard", roomNoticeBuyGuard)
  63. e.GET("/live.xuserex.v1.RoomNotice/is_task_finish", roomNoticeIsTaskFinish)
  64. e.GET("/live.xuserex.v1.RoomNotice/set_task_finish", roomNoticeSetTaskFinish)
  65. }