This commit is contained in:
2026-09-18 03:24:01 +07:00
parent f8a4ca0f55
commit fc171dace5
9 changed files with 547 additions and 288 deletions
+38
View File
@@ -80,6 +80,7 @@ const (
EveningDetectiveServer_GetGameResults_FullMethodName = "/crabs.evening_detective_server.EveningDetectiveServer/GetGameResults"
EveningDetectiveServer_CreateGameReview_FullMethodName = "/crabs.evening_detective_server.EveningDetectiveServer/CreateGameReview"
EveningDetectiveServer_GetGameReviews_FullMethodName = "/crabs.evening_detective_server.EveningDetectiveServer/GetGameReviews"
EveningDetectiveServer_GetScenarioReviews_FullMethodName = "/crabs.evening_detective_server.EveningDetectiveServer/GetScenarioReviews"
EveningDetectiveServer_GetGameReviewsForModeration_FullMethodName = "/crabs.evening_detective_server.EveningDetectiveServer/GetGameReviewsForModeration"
EveningDetectiveServer_GetReviewsForModeration_FullMethodName = "/crabs.evening_detective_server.EveningDetectiveServer/GetReviewsForModeration"
EveningDetectiveServer_ModerateGameReview_FullMethodName = "/crabs.evening_detective_server.EveningDetectiveServer/ModerateGameReview"
@@ -176,6 +177,7 @@ type EveningDetectiveServerClient interface {
GetGameResults(ctx context.Context, in *GetGameResultsReq, opts ...grpc.CallOption) (*GetGameResultsRsp, error)
CreateGameReview(ctx context.Context, in *CreateGameReviewReq, opts ...grpc.CallOption) (*CreateGameReviewRsp, error)
GetGameReviews(ctx context.Context, in *GetGameReviewsReq, opts ...grpc.CallOption) (*GetGameReviewsRsp, error)
GetScenarioReviews(ctx context.Context, in *GetScenarioReviewsReq, opts ...grpc.CallOption) (*GetGameReviewsRsp, error)
GetGameReviewsForModeration(ctx context.Context, in *GetGameReviewsReq, opts ...grpc.CallOption) (*GetGameReviewsRsp, error)
GetReviewsForModeration(ctx context.Context, in *GetReviewsForModerationReq, opts ...grpc.CallOption) (*GetGameReviewsRsp, error)
ModerateGameReview(ctx context.Context, in *ModerateGameReviewReq, opts ...grpc.CallOption) (*ModerateGameReviewRsp, error)
@@ -806,6 +808,16 @@ func (c *eveningDetectiveServerClient) GetGameReviews(ctx context.Context, in *G
return out, nil
}
func (c *eveningDetectiveServerClient) GetScenarioReviews(ctx context.Context, in *GetScenarioReviewsReq, opts ...grpc.CallOption) (*GetGameReviewsRsp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetGameReviewsRsp)
err := c.cc.Invoke(ctx, EveningDetectiveServer_GetScenarioReviews_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *eveningDetectiveServerClient) GetGameReviewsForModeration(ctx context.Context, in *GetGameReviewsReq, opts ...grpc.CallOption) (*GetGameReviewsRsp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetGameReviewsRsp)
@@ -1080,6 +1092,7 @@ type EveningDetectiveServerServer interface {
GetGameResults(context.Context, *GetGameResultsReq) (*GetGameResultsRsp, error)
CreateGameReview(context.Context, *CreateGameReviewReq) (*CreateGameReviewRsp, error)
GetGameReviews(context.Context, *GetGameReviewsReq) (*GetGameReviewsRsp, error)
GetScenarioReviews(context.Context, *GetScenarioReviewsReq) (*GetGameReviewsRsp, error)
GetGameReviewsForModeration(context.Context, *GetGameReviewsReq) (*GetGameReviewsRsp, error)
GetReviewsForModeration(context.Context, *GetReviewsForModerationReq) (*GetGameReviewsRsp, error)
ModerateGameReview(context.Context, *ModerateGameReviewReq) (*ModerateGameReviewRsp, error)
@@ -1290,6 +1303,9 @@ func (UnimplementedEveningDetectiveServerServer) CreateGameReview(context.Contex
func (UnimplementedEveningDetectiveServerServer) GetGameReviews(context.Context, *GetGameReviewsReq) (*GetGameReviewsRsp, error) {
return nil, status.Error(codes.Unimplemented, "method GetGameReviews not implemented")
}
func (UnimplementedEveningDetectiveServerServer) GetScenarioReviews(context.Context, *GetScenarioReviewsReq) (*GetGameReviewsRsp, error) {
return nil, status.Error(codes.Unimplemented, "method GetScenarioReviews not implemented")
}
func (UnimplementedEveningDetectiveServerServer) GetGameReviewsForModeration(context.Context, *GetGameReviewsReq) (*GetGameReviewsRsp, error) {
return nil, status.Error(codes.Unimplemented, "method GetGameReviewsForModeration not implemented")
}
@@ -2452,6 +2468,24 @@ func _EveningDetectiveServer_GetGameReviews_Handler(srv interface{}, ctx context
return interceptor(ctx, in, info, handler)
}
func _EveningDetectiveServer_GetScenarioReviews_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetScenarioReviewsReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EveningDetectiveServerServer).GetScenarioReviews(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: EveningDetectiveServer_GetScenarioReviews_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EveningDetectiveServerServer).GetScenarioReviews(ctx, req.(*GetScenarioReviewsReq))
}
return interceptor(ctx, in, info, handler)
}
func _EveningDetectiveServer_GetGameReviewsForModeration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetGameReviewsReq)
if err := dec(in); err != nil {
@@ -3059,6 +3093,10 @@ var EveningDetectiveServer_ServiceDesc = grpc.ServiceDesc{
MethodName: "GetGameReviews",
Handler: _EveningDetectiveServer_GetGameReviews_Handler,
},
{
MethodName: "GetScenarioReviews",
Handler: _EveningDetectiveServer_GetScenarioReviews_Handler,
},
{
MethodName: "GetGameReviewsForModeration",
Handler: _EveningDetectiveServer_GetGameReviewsForModeration_Handler,