roomAdmin.bm.go 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // Code generated by protoc-gen-bm v0.1, DO NOT EDIT.
  2. // source: api/http/v1/roomAdmin.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/http/v1/roomAdmin.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. // ===================
  20. // RoomAdmin Interface
  21. // ===================
  22. // History 相关服务
  23. type RoomAdmin interface {
  24. // 获取主播拥有的的所有房管, 无需登录态
  25. // `method:"GET"
  26. GetByRoom(ctx context.Context, req *RoomAdminGetByRoomReq) (resp *RoomAdminGetByRoomResp, err error)
  27. }
  28. var v1RoomAdminSvc RoomAdmin
  29. // @params RoomAdminGetByRoomReq
  30. // @router GET /xlive/web-room/v1/roomAdmin/get_by_room
  31. // @response RoomAdminGetByRoomResp
  32. func roomAdminGetByRoom(c *bm.Context) {
  33. p := new(RoomAdminGetByRoomReq)
  34. if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
  35. return
  36. }
  37. resp, err := v1RoomAdminSvc.GetByRoom(c, p)
  38. c.JSON(resp, err)
  39. }
  40. // RegisterV1RoomAdminService Register the blademaster route with middleware map
  41. // midMap is the middleware map, the key is defined in proto
  42. func RegisterV1RoomAdminService(e *bm.Engine, svc RoomAdmin, midMap map[string]bm.HandlerFunc) {
  43. v1RoomAdminSvc = svc
  44. e.GET("/xlive/web-room/v1/roomAdmin/get_by_room", roomAdminGetByRoom)
  45. }