123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- // Code generated by protoc-gen-bm v0.1, DO NOT EDIT.
- // source: service.proto
- /*
- Package v1 is a generated blademaster stub package.
- This code was generated with go-common/app/tool/bmgen/protoc-gen-bm v0.1.
- It is generated from these files:
- service.proto
- */
- package v1
- import (
- "context"
- bm "go-common/library/net/http/blademaster"
- "go-common/library/net/http/blademaster/binding"
- )
- // to suppressed 'imported but not used warning'
- var _ *bm.Context
- var _ context.Context
- var _ binding.StructValidator
- var PathRoomAdminIsAny = "/live.appucenter.v1.RoomAdmin/is_any"
- var PathRoomAdminGetByUid = "/live.appucenter.v1.RoomAdmin/get_by_uid"
- var PathRoomAdminResign = "/live.appucenter.v1.RoomAdmin/resign"
- var PathRoomAdminSearchForAdmin = "/live.appucenter.v1.RoomAdmin/search_for_admin"
- var PathRoomAdminGetByAnchor = "/live.appucenter.v1.RoomAdmin/get_by_anchor"
- var PathRoomAdminDismiss = "/live.appucenter.v1.RoomAdmin/dismiss"
- var PathRoomAdminAppoint = "/live.appucenter.v1.RoomAdmin/appoint"
- // ===================
- // RoomAdmin Interface
- // ===================
- // History 相关服务
- type RoomAdminBMServer interface {
- // 根据登录态获取功能入口是否显示, 需要登录态
- // `method:"GET" midware:"auth"`
- IsAny(ctx context.Context, req *ShowEntryReq) (resp *ShowEntryResp, err error)
- // 获取用户拥有的的所有房管身份
- // `method:"GET" midware:"auth"`
- GetByUid(ctx context.Context, req *RoomAdminGetByUidReq) (resp *RoomAdminGetByUidResp, err error)
- // 辞职房管
- // `method:"POST" midware:"auth"`
- Resign(ctx context.Context, req *RoomAdminResignRoomAdminReq) (resp *RoomAdminResignRoomAdminResp, err error)
- // 查询需要添加的房管
- // `method:"POST" midware:"auth"`
- SearchForAdmin(ctx context.Context, req *RoomAdminSearchForAdminReq) (resp *RoomAdminSearchForAdminResp, err error)
- // 获取主播拥有的的所有房管
- // `method:"GET" midware:"auth"`
- GetByAnchor(ctx context.Context, req *RoomAdminGetByAnchorReq) (resp *RoomAdminGetByAnchorResp, err error)
- // 撤销房管
- // `method:"POST" midware:"auth"`
- Dismiss(ctx context.Context, req *RoomAdminDismissAdminReq) (resp *RoomAdminDismissAdminResp, err error)
- // 任命房管
- // `method:"POST" midware:"auth"`
- Appoint(ctx context.Context, req *RoomAdminAddReq) (resp *RoomAdminAddResp, err error)
- }
- var v1RoomAdminSvc RoomAdminBMServer
- func roomAdminIsAny(c *bm.Context) {
- p := new(ShowEntryReq)
- if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
- return
- }
- resp, err := v1RoomAdminSvc.IsAny(c, p)
- c.JSON(resp, err)
- }
- func roomAdminGetByUid(c *bm.Context) {
- p := new(RoomAdminGetByUidReq)
- if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
- return
- }
- resp, err := v1RoomAdminSvc.GetByUid(c, p)
- c.JSON(resp, err)
- }
- func roomAdminResign(c *bm.Context) {
- p := new(RoomAdminResignRoomAdminReq)
- if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
- return
- }
- resp, err := v1RoomAdminSvc.Resign(c, p)
- c.JSON(resp, err)
- }
- func roomAdminSearchForAdmin(c *bm.Context) {
- p := new(RoomAdminSearchForAdminReq)
- if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
- return
- }
- resp, err := v1RoomAdminSvc.SearchForAdmin(c, p)
- c.JSON(resp, err)
- }
- func roomAdminGetByAnchor(c *bm.Context) {
- p := new(RoomAdminGetByAnchorReq)
- if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
- return
- }
- resp, err := v1RoomAdminSvc.GetByAnchor(c, p)
- c.JSON(resp, err)
- }
- func roomAdminDismiss(c *bm.Context) {
- p := new(RoomAdminDismissAdminReq)
- if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
- return
- }
- resp, err := v1RoomAdminSvc.Dismiss(c, p)
- c.JSON(resp, err)
- }
- func roomAdminAppoint(c *bm.Context) {
- p := new(RoomAdminAddReq)
- if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
- return
- }
- resp, err := v1RoomAdminSvc.Appoint(c, p)
- c.JSON(resp, err)
- }
- // RegisterV1RoomAdminService Register the blademaster route with middleware map
- // midMap is the middleware map, the key is defined in proto
- func RegisterV1RoomAdminService(e *bm.Engine, svc RoomAdminBMServer, midMap map[string]bm.HandlerFunc) {
- auth := midMap["auth"]
- v1RoomAdminSvc = svc
- e.GET("/xlive/app-ucenter/v1/roomAdmin/is_any", auth, roomAdminIsAny)
- e.GET("/xlive/app-ucenter/v1/roomAdmin/get_by_uid", auth, roomAdminGetByUid)
- e.POST("/xlive/app-ucenter/v1/roomAdmin/resign", auth, roomAdminResign)
- e.POST("/xlive/app-ucenter/v1/roomAdmin/search_for_admin", auth, roomAdminSearchForAdmin)
- e.GET("/xlive/app-ucenter/v1/roomAdmin/get_by_anchor", auth, roomAdminGetByAnchor)
- e.POST("/xlive/app-ucenter/v1/roomAdmin/dismiss", auth, roomAdminDismiss)
- e.POST("/xlive/app-ucenter/v1/roomAdmin/appoint", auth, roomAdminAppoint)
- }
- // RegisterRoomAdminBMServer Register the blademaster route
- func RegisterRoomAdminBMServer(e *bm.Engine, server RoomAdminBMServer) {
- v1RoomAdminSvc = server
- e.GET("/live.appucenter.v1.RoomAdmin/is_any", roomAdminIsAny)
- e.GET("/live.appucenter.v1.RoomAdmin/get_by_uid", roomAdminGetByUid)
- e.POST("/live.appucenter.v1.RoomAdmin/resign", roomAdminResign)
- e.POST("/live.appucenter.v1.RoomAdmin/search_for_admin", roomAdminSearchForAdmin)
- e.GET("/live.appucenter.v1.RoomAdmin/get_by_anchor", roomAdminGetByAnchor)
- e.POST("/live.appucenter.v1.RoomAdmin/dismiss", roomAdminDismiss)
- e.POST("/live.appucenter.v1.RoomAdmin/appoint", roomAdminAppoint)
- }
|