199 lines
6.8 KiB
Go
199 lines
6.8 KiB
Go
|
// Code generated by protoc-gen-bm v0.1, DO NOT EDIT.
|
||
|
// source: api/grpc/v1/api.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:
|
||
|
api/grpc/v1/api.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
|
||
|
|
||
|
// ===================
|
||
|
// RoomAdmin Interface
|
||
|
// ===================
|
||
|
|
||
|
// History 相关服务
|
||
|
type RoomAdmin interface {
|
||
|
// 根据登录态获取功能入口是否显示, 需要登录态
|
||
|
IsAny(ctx context.Context, req *RoomAdminShowEntryReq) (resp *RoomAdminShowEntryResp, err error)
|
||
|
|
||
|
// 获取用户拥有的的所有房管身份
|
||
|
GetByUid(ctx context.Context, req *RoomAdminGetByUidReq) (resp *RoomAdminGetByUidResp, err error)
|
||
|
|
||
|
// 辞职房管
|
||
|
Resign(ctx context.Context, req *RoomAdminResignRoomAdminReq) (resp *RoomAdminResignRoomAdminResp, err error)
|
||
|
|
||
|
// 查询需要添加的房管
|
||
|
SearchForAdmin(ctx context.Context, req *RoomAdminSearchForAdminReq) (resp *RoomAdminSearchForAdminResp, err error)
|
||
|
|
||
|
// 获取主播拥有的的所有房管
|
||
|
GetByAnchor(ctx context.Context, req *RoomAdminGetByAnchorReq) (resp *RoomAdminGetByAnchorResp, err error)
|
||
|
|
||
|
// 获取主播拥有的的所有房管,房间号维度
|
||
|
GetByRoom(ctx context.Context, req *RoomAdminGetByRoomReq) (resp *RoomAdminGetByRoomResp, err error)
|
||
|
|
||
|
// 撤销房管
|
||
|
Dismiss(ctx context.Context, req *RoomAdminDismissAdminReq) (resp *RoomAdminDismissAdminResp, err error)
|
||
|
|
||
|
// 任命房管
|
||
|
Appoint(ctx context.Context, req *RoomAdminAddReq) (resp *RoomAdminAddResp, err error)
|
||
|
|
||
|
// 是否房管
|
||
|
IsAdmin(ctx context.Context, req *RoomAdminIsAdminReq) (resp *RoomAdminIsAdminResp, err error)
|
||
|
|
||
|
// 是否房管, 不额外返回用户信息, 不判断是否主播自己
|
||
|
IsAdminShort(ctx context.Context, req *RoomAdminIsAdminShortReq) (resp *RoomAdminIsAdminShortResp, err error)
|
||
|
}
|
||
|
|
||
|
var v1RoomAdminSvc RoomAdmin
|
||
|
|
||
|
// @params RoomAdminShowEntryReq
|
||
|
// @router GET /xlive/xuser/v1/roomAdmin/is_any
|
||
|
// @response RoomAdminShowEntryResp
|
||
|
func roomAdminIsAny(c *bm.Context) {
|
||
|
p := new(RoomAdminShowEntryReq)
|
||
|
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)
|
||
|
}
|
||
|
|
||
|
// @params RoomAdminGetByUidReq
|
||
|
// @router GET /xlive/xuser/v1/roomAdmin/get_by_uid
|
||
|
// @response RoomAdminGetByUidResp
|
||
|
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)
|
||
|
}
|
||
|
|
||
|
// @params RoomAdminResignRoomAdminReq
|
||
|
// @router GET /xlive/xuser/v1/roomAdmin/resign
|
||
|
// @response RoomAdminResignRoomAdminResp
|
||
|
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)
|
||
|
}
|
||
|
|
||
|
// @params RoomAdminSearchForAdminReq
|
||
|
// @router GET /xlive/xuser/v1/roomAdmin/search_for_admin
|
||
|
// @response RoomAdminSearchForAdminResp
|
||
|
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)
|
||
|
}
|
||
|
|
||
|
// @params RoomAdminGetByAnchorReq
|
||
|
// @router GET /xlive/xuser/v1/roomAdmin/get_by_anchor
|
||
|
// @response RoomAdminGetByAnchorResp
|
||
|
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)
|
||
|
}
|
||
|
|
||
|
// @params RoomAdminGetByRoomReq
|
||
|
// @router GET /xlive/xuser/v1/roomAdmin/get_by_room
|
||
|
// @response RoomAdminGetByRoomResp
|
||
|
func roomAdminGetByRoom(c *bm.Context) {
|
||
|
p := new(RoomAdminGetByRoomReq)
|
||
|
if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
|
||
|
return
|
||
|
}
|
||
|
resp, err := v1RoomAdminSvc.GetByRoom(c, p)
|
||
|
c.JSON(resp, err)
|
||
|
}
|
||
|
|
||
|
// @params RoomAdminDismissAdminReq
|
||
|
// @router GET /xlive/xuser/v1/roomAdmin/dismiss
|
||
|
// @response RoomAdminDismissAdminResp
|
||
|
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)
|
||
|
}
|
||
|
|
||
|
// @params RoomAdminAddReq
|
||
|
// @router GET /xlive/xuser/v1/roomAdmin/appoint
|
||
|
// @response RoomAdminAddResp
|
||
|
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)
|
||
|
}
|
||
|
|
||
|
// @params RoomAdminIsAdminReq
|
||
|
// @router GET /xlive/xuser/v1/roomAdmin/is_admin
|
||
|
// @response RoomAdminIsAdminResp
|
||
|
func roomAdminIsAdmin(c *bm.Context) {
|
||
|
p := new(RoomAdminIsAdminReq)
|
||
|
if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
|
||
|
return
|
||
|
}
|
||
|
resp, err := v1RoomAdminSvc.IsAdmin(c, p)
|
||
|
c.JSON(resp, err)
|
||
|
}
|
||
|
|
||
|
// @params RoomAdminIsAdminShortReq
|
||
|
// @router GET /xlive/xuser/v1/roomAdmin/is_admin_short
|
||
|
// @response RoomAdminIsAdminShortResp
|
||
|
func roomAdminIsAdminShort(c *bm.Context) {
|
||
|
p := new(RoomAdminIsAdminShortReq)
|
||
|
if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
|
||
|
return
|
||
|
}
|
||
|
resp, err := v1RoomAdminSvc.IsAdminShort(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 RoomAdmin, midMap map[string]bm.HandlerFunc) {
|
||
|
v1RoomAdminSvc = svc
|
||
|
e.GET("/xlive/xuser/v1/roomAdmin/is_any", roomAdminIsAny)
|
||
|
e.GET("/xlive/xuser/v1/roomAdmin/get_by_uid", roomAdminGetByUid)
|
||
|
e.GET("/xlive/xuser/v1/roomAdmin/resign", roomAdminResign)
|
||
|
e.GET("/xlive/xuser/v1/roomAdmin/search_for_admin", roomAdminSearchForAdmin)
|
||
|
e.GET("/xlive/xuser/v1/roomAdmin/get_by_anchor", roomAdminGetByAnchor)
|
||
|
e.GET("/xlive/xuser/v1/roomAdmin/get_by_room", roomAdminGetByRoom)
|
||
|
e.GET("/xlive/xuser/v1/roomAdmin/dismiss", roomAdminDismiss)
|
||
|
e.GET("/xlive/xuser/v1/roomAdmin/appoint", roomAdminAppoint)
|
||
|
e.GET("/xlive/xuser/v1/roomAdmin/is_admin", roomAdminIsAdmin)
|
||
|
e.GET("/xlive/xuser/v1/roomAdmin/is_admin_short", roomAdminIsAdminShort)
|
||
|
}
|