|
|
|
@ -23,6 +23,7 @@ const _ = http.SupportPackageIsVersion1
|
|
|
|
|
const OperationRoomAddRoomLike = "/gateway_room.v1.Room/AddRoomLike" |
|
|
|
|
const OperationRoomApplyJoinGuild = "/gateway_room.v1.Room/ApplyJoinGuild" |
|
|
|
|
const OperationRoomBenChatMessage = "/gateway_room.v1.Room/BenChatMessage" |
|
|
|
|
const OperationRoomClearRoomScreen = "/gateway_room.v1.Room/ClearRoomScreen" |
|
|
|
|
const OperationRoomConfirmJoinGuild = "/gateway_room.v1.Room/ConfirmJoinGuild" |
|
|
|
|
const OperationRoomConfirmMike = "/gateway_room.v1.Room/ConfirmMike" |
|
|
|
|
const OperationRoomCreateRoomCollect = "/gateway_room.v1.Room/CreateRoomCollect" |
|
|
|
@ -63,6 +64,8 @@ type RoomHTTPServer interface {
|
|
|
|
|
ApplyJoinGuild(context.Context, *ApplyJoinGuildReq) (*common.Empty, error) |
|
|
|
|
// BenChatMessage 房间内禁言
|
|
|
|
|
BenChatMessage(context.Context, *BenChatMessageReq) (*common.Empty, error) |
|
|
|
|
// ClearRoomScreen 清除房间公屏
|
|
|
|
|
ClearRoomScreen(context.Context, *ClearRoomScreenReq) (*common.Empty, error) |
|
|
|
|
// ConfirmJoinGuild 同意/拒绝加入公会
|
|
|
|
|
ConfirmJoinGuild(context.Context, *ConfirmJoinGuildReq) (*common.Empty, error) |
|
|
|
|
// ConfirmMike 上麦确定
|
|
|
|
@ -166,6 +169,7 @@ func RegisterRoomHTTPServer(s *http.Server, srv RoomHTTPServer) {
|
|
|
|
|
r.POST("/v1/room/mike/heat/record", _Room_GetMikeHeatRecordList0_HTTP_Handler(srv)) |
|
|
|
|
r.POST("/v1/room/top/contribution", _Room_TopContributionCount0_HTTP_Handler(srv)) |
|
|
|
|
r.POST("/v1/room/ban/chat", _Room_BenChatMessage0_HTTP_Handler(srv)) |
|
|
|
|
r.POST("/v1/room/clear/screen", _Room_ClearRoomScreen0_HTTP_Handler(srv)) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func _Room_ConfirmMike0_HTTP_Handler(srv RoomHTTPServer) func(ctx http.Context) error { |
|
|
|
@ -938,10 +942,33 @@ func _Room_BenChatMessage0_HTTP_Handler(srv RoomHTTPServer) func(ctx http.Contex
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func _Room_ClearRoomScreen0_HTTP_Handler(srv RoomHTTPServer) func(ctx http.Context) error { |
|
|
|
|
return func(ctx http.Context) error { |
|
|
|
|
var in ClearRoomScreenReq |
|
|
|
|
if err := ctx.Bind(&in); err != nil { |
|
|
|
|
return err |
|
|
|
|
} |
|
|
|
|
if err := ctx.BindQuery(&in); err != nil { |
|
|
|
|
return err |
|
|
|
|
} |
|
|
|
|
http.SetOperation(ctx, OperationRoomClearRoomScreen) |
|
|
|
|
h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { |
|
|
|
|
return srv.ClearRoomScreen(ctx, req.(*ClearRoomScreenReq)) |
|
|
|
|
}) |
|
|
|
|
out, err := h(ctx, &in) |
|
|
|
|
if err != nil { |
|
|
|
|
return err |
|
|
|
|
} |
|
|
|
|
reply := out.(*common.Empty) |
|
|
|
|
return ctx.Result(200, reply) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type RoomHTTPClient interface { |
|
|
|
|
AddRoomLike(ctx context.Context, req *AddRoomLikeReq, opts ...http.CallOption) (rsp *common.Empty, err error) |
|
|
|
|
ApplyJoinGuild(ctx context.Context, req *ApplyJoinGuildReq, opts ...http.CallOption) (rsp *common.Empty, err error) |
|
|
|
|
BenChatMessage(ctx context.Context, req *BenChatMessageReq, opts ...http.CallOption) (rsp *common.Empty, err error) |
|
|
|
|
ClearRoomScreen(ctx context.Context, req *ClearRoomScreenReq, opts ...http.CallOption) (rsp *common.Empty, err error) |
|
|
|
|
ConfirmJoinGuild(ctx context.Context, req *ConfirmJoinGuildReq, opts ...http.CallOption) (rsp *common.Empty, err error) |
|
|
|
|
ConfirmMike(ctx context.Context, req *ConfirmMikeRequest, opts ...http.CallOption) (rsp *ConfirmMikeReply, err error) |
|
|
|
|
CreateRoomCollect(ctx context.Context, req *CreateRoomCollectReq, opts ...http.CallOption) (rsp *common.Empty, err error) |
|
|
|
@ -1023,6 +1050,19 @@ func (c *RoomHTTPClientImpl) BenChatMessage(ctx context.Context, in *BenChatMess
|
|
|
|
|
return &out, err |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (c *RoomHTTPClientImpl) ClearRoomScreen(ctx context.Context, in *ClearRoomScreenReq, opts ...http.CallOption) (*common.Empty, error) { |
|
|
|
|
var out common.Empty |
|
|
|
|
pattern := "/v1/room/clear/screen" |
|
|
|
|
path := binding.EncodeURL(pattern, in, false) |
|
|
|
|
opts = append(opts, http.Operation(OperationRoomClearRoomScreen)) |
|
|
|
|
opts = append(opts, http.PathTemplate(pattern)) |
|
|
|
|
err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...) |
|
|
|
|
if err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
return &out, err |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (c *RoomHTTPClientImpl) ConfirmJoinGuild(ctx context.Context, in *ConfirmJoinGuildReq, opts ...http.CallOption) (*common.Empty, error) { |
|
|
|
|
var out common.Empty |
|
|
|
|
pattern := "/v1/room/guild/confirm" |
|
|
|
|