api.bm.go 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // Code generated by protoc-gen-bm v0.1, DO NOT EDIT.
  2. // source: api.proto
  3. /*
  4. Package api 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 api
  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 PathRecPoolGetList = "/live.xroomfeed.v1.RecPool/GetList"
  20. // =================
  21. // RecPool Interface
  22. // =================
  23. type RecPoolBMServer interface {
  24. // 根据模块位置获取投放列表 position=>RoomItem
  25. GetList(ctx context.Context, req *RecPoolReq) (resp *RecPoolResp, err error)
  26. }
  27. var RecPoolSvc RecPoolBMServer
  28. func recPoolGetList(c *bm.Context) {
  29. p := new(RecPoolReq)
  30. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  31. return
  32. }
  33. resp, err := RecPoolSvc.GetList(c, p)
  34. c.JSON(resp, err)
  35. }
  36. // RegisterRecPoolBMServer Register the blademaster route
  37. func RegisterRecPoolBMServer(e *bm.Engine, server RecPoolBMServer) {
  38. RecPoolSvc = server
  39. e.GET("/live.xroomfeed.v1.RecPool/GetList", recPoolGetList)
  40. }