Browse Source

清除房间公屏

master
otto 2 weeks ago
parent
commit
4a63323f73
  1. 920
      gateway/v1/room/room.pb.go
  2. 13
      gateway/v1/room/room.proto
  3. 43
      gateway/v1/room/room.swagger.json
  4. 28
      gateway/v1/room/room.swagger.yaml
  5. 39
      gateway/v1/room/room_grpc.pb.go
  6. 40
      gateway/v1/room/room_http.pb.go

920
gateway/v1/room/room.pb.go

File diff suppressed because it is too large Load Diff

13
gateway/v1/room/room.proto

@ -344,6 +344,14 @@ service Room {
body: "*"
};
}
//
rpc ClearRoomScreen (ClearRoomScreenReq) returns (metachat.api.service.common.Empty){
option (google.api.http) = {
post: "/v1/room/clear/screen"
body: "*"
};
}
}
//
@ -2108,4 +2116,9 @@ message BenChatMessageReq {
// 1. 2.
int32 status = 3;
}
message ClearRoomScreenReq {
//id
int64 room_id = 1;
}

43
gateway/v1/room/room.swagger.json

@ -511,6 +511,39 @@
]
}
},
"/v1/room/clear/screen": {
"post": {
"summary": "清除房间公屏",
"operationId": "Room_ClearRoomScreen",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/commonEmpty"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1ClearRoomScreenReq"
}
}
],
"tags": [
"Room"
]
}
},
"/v1/room/collect/add": {
"post": {
"summary": "收藏房间",
@ -1360,6 +1393,16 @@
}
}
},
"v1ClearRoomScreenReq": {
"type": "object",
"properties": {
"room_id": {
"type": "string",
"format": "int64",
"title": "房间id"
}
}
},
"v1ConfirmJoinGuildReq": {
"type": "object",
"properties": {

28
gateway/v1/room/room.swagger.yaml

@ -324,6 +324,27 @@ paths:
$ref: '#/definitions/commonEmpty'
tags:
- Room
/v1/room/clear/screen:
post:
summary: 清除房间公屏
operationId: Room_ClearRoomScreen
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/commonEmpty'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: body
in: body
required: true
schema:
$ref: '#/definitions/v1ClearRoomScreenReq'
tags:
- Room
/v1/room/collect/add:
post:
summary: 收藏房间
@ -883,6 +904,13 @@ definitions:
type: integer
format: int32
title: 1.禁言 2.解禁
v1ClearRoomScreenReq:
type: object
properties:
room_id:
type: string
format: int64
title: 房间id
v1ConfirmJoinGuildReq:
type: object
properties:

39
gateway/v1/room/room_grpc.pb.go

@ -55,6 +55,7 @@ const (
Room_GetMikeHeatRecordList_FullMethodName = "/gateway_room.v1.Room/GetMikeHeatRecordList"
Room_TopContributionCount_FullMethodName = "/gateway_room.v1.Room/TopContributionCount"
Room_BenChatMessage_FullMethodName = "/gateway_room.v1.Room/BenChatMessage"
Room_ClearRoomScreen_FullMethodName = "/gateway_room.v1.Room/ClearRoomScreen"
)
// RoomClient is the client API for Room service.
@ -131,6 +132,8 @@ type RoomClient interface {
TopContributionCount(ctx context.Context, in *TopContributionCountReq, opts ...grpc.CallOption) (*TopContributionCountResp, error)
// 房间内禁言
BenChatMessage(ctx context.Context, in *BenChatMessageReq, opts ...grpc.CallOption) (*common.Empty, error)
// 清除房间公屏
ClearRoomScreen(ctx context.Context, in *ClearRoomScreenReq, opts ...grpc.CallOption) (*common.Empty, error)
}
type roomClient struct {
@ -456,6 +459,15 @@ func (c *roomClient) BenChatMessage(ctx context.Context, in *BenChatMessageReq,
return out, nil
}
func (c *roomClient) ClearRoomScreen(ctx context.Context, in *ClearRoomScreenReq, opts ...grpc.CallOption) (*common.Empty, error) {
out := new(common.Empty)
err := c.cc.Invoke(ctx, Room_ClearRoomScreen_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// RoomServer is the server API for Room service.
// All implementations must embed UnimplementedRoomServer
// for forward compatibility
@ -530,6 +542,8 @@ type RoomServer interface {
TopContributionCount(context.Context, *TopContributionCountReq) (*TopContributionCountResp, error)
// 房间内禁言
BenChatMessage(context.Context, *BenChatMessageReq) (*common.Empty, error)
// 清除房间公屏
ClearRoomScreen(context.Context, *ClearRoomScreenReq) (*common.Empty, error)
mustEmbedUnimplementedRoomServer()
}
@ -642,6 +656,9 @@ func (UnimplementedRoomServer) TopContributionCount(context.Context, *TopContrib
func (UnimplementedRoomServer) BenChatMessage(context.Context, *BenChatMessageReq) (*common.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method BenChatMessage not implemented")
}
func (UnimplementedRoomServer) ClearRoomScreen(context.Context, *ClearRoomScreenReq) (*common.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ClearRoomScreen not implemented")
}
func (UnimplementedRoomServer) mustEmbedUnimplementedRoomServer() {}
// UnsafeRoomServer may be embedded to opt out of forward compatibility for this service.
@ -1285,6 +1302,24 @@ func _Room_BenChatMessage_Handler(srv interface{}, ctx context.Context, dec func
return interceptor(ctx, in, info, handler)
}
func _Room_ClearRoomScreen_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ClearRoomScreenReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RoomServer).ClearRoomScreen(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Room_ClearRoomScreen_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RoomServer).ClearRoomScreen(ctx, req.(*ClearRoomScreenReq))
}
return interceptor(ctx, in, info, handler)
}
// Room_ServiceDesc is the grpc.ServiceDesc for Room service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@ -1432,6 +1467,10 @@ var Room_ServiceDesc = grpc.ServiceDesc{
MethodName: "BenChatMessage",
Handler: _Room_BenChatMessage_Handler,
},
{
MethodName: "ClearRoomScreen",
Handler: _Room_ClearRoomScreen_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "gateway/v1/room/room.proto",

40
gateway/v1/room/room_http.pb.go

@ -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"

Loading…
Cancel
Save