roomNotice.bm.go 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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.approom.v1.RoomNotice/buy_guard"
  20. // ====================
  21. // RoomNotice Interface
  22. // ====================
  23. // 房间提示 相关服务
  24. type RoomNoticeBMServer interface {
  25. // 是否弹出大航海购买提示
  26. BuyGuard(ctx context.Context, req *RoomNoticeBuyGuardReq) (resp *RoomNoticeBuyGuardResp, err error)
  27. }
  28. var v1RoomNoticeSvc RoomNoticeBMServer
  29. func roomNoticeBuyGuard(c *bm.Context) {
  30. p := new(RoomNoticeBuyGuardReq)
  31. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  32. return
  33. }
  34. resp, err := v1RoomNoticeSvc.BuyGuard(c, p)
  35. c.JSON(resp, err)
  36. }
  37. // RegisterV1RoomNoticeService Register the blademaster route with middleware map
  38. // midMap is the middleware map, the key is defined in proto
  39. func RegisterV1RoomNoticeService(e *bm.Engine, svc RoomNoticeBMServer, midMap map[string]bm.HandlerFunc) {
  40. v1RoomNoticeSvc = svc
  41. e.GET("/xlive/app-room/v1/roomNotice/buy_guard", roomNoticeBuyGuard)
  42. }
  43. // RegisterRoomNoticeBMServer Register the blademaster route
  44. func RegisterRoomNoticeBMServer(e *bm.Engine, server RoomNoticeBMServer) {
  45. v1RoomNoticeSvc = server
  46. e.GET("/live.approom.v1.RoomNotice/buy_guard", roomNoticeBuyGuard)
  47. }