This commit is contained in:
2025-05-31 04:17:55 +07:00
parent 49999e9e70
commit 42dc516e29
22 changed files with 513 additions and 180 deletions
+37
View File
@@ -25,6 +25,7 @@ const (
EveningDetective_GetTeamsCSV_FullMethodName = "/crabs.evening_detective.EveningDetective/GetTeamsCSV"
EveningDetective_GetTeam_FullMethodName = "/crabs.evening_detective.EveningDetective/GetTeam"
EveningDetective_AddAction_FullMethodName = "/crabs.evening_detective.EveningDetective/AddAction"
EveningDetective_GetGame_FullMethodName = "/crabs.evening_detective.EveningDetective/GetGame"
EveningDetective_GameStart_FullMethodName = "/crabs.evening_detective.EveningDetective/GameStart"
EveningDetective_GameStop_FullMethodName = "/crabs.evening_detective.EveningDetective/GameStop"
EveningDetective_GiveApplications_FullMethodName = "/crabs.evening_detective.EveningDetective/GiveApplications"
@@ -40,6 +41,7 @@ type EveningDetectiveClient interface {
GetTeamsCSV(ctx context.Context, in *GetTeamsCSVReq, opts ...grpc.CallOption) (*GetTeamsCSVRsp, error)
GetTeam(ctx context.Context, in *GetTeamReq, opts ...grpc.CallOption) (*GetTeamRsp, error)
AddAction(ctx context.Context, in *AddActionReq, opts ...grpc.CallOption) (*AddActionRsp, error)
GetGame(ctx context.Context, in *GetGameReq, opts ...grpc.CallOption) (*GetGameRsp, error)
GameStart(ctx context.Context, in *GameStartReq, opts ...grpc.CallOption) (*GameStartRsp, error)
GameStop(ctx context.Context, in *GameStopReq, opts ...grpc.CallOption) (*GameStopRsp, error)
GiveApplications(ctx context.Context, in *GiveApplicationsReq, opts ...grpc.CallOption) (*GiveApplicationsRsp, error)
@@ -107,6 +109,15 @@ func (c *eveningDetectiveClient) AddAction(ctx context.Context, in *AddActionReq
return out, nil
}
func (c *eveningDetectiveClient) GetGame(ctx context.Context, in *GetGameReq, opts ...grpc.CallOption) (*GetGameRsp, error) {
out := new(GetGameRsp)
err := c.cc.Invoke(ctx, EveningDetective_GetGame_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *eveningDetectiveClient) GameStart(ctx context.Context, in *GameStartReq, opts ...grpc.CallOption) (*GameStartRsp, error) {
out := new(GameStartRsp)
err := c.cc.Invoke(ctx, EveningDetective_GameStart_FullMethodName, in, out, opts...)
@@ -144,6 +155,7 @@ type EveningDetectiveServer interface {
GetTeamsCSV(context.Context, *GetTeamsCSVReq) (*GetTeamsCSVRsp, error)
GetTeam(context.Context, *GetTeamReq) (*GetTeamRsp, error)
AddAction(context.Context, *AddActionReq) (*AddActionRsp, error)
GetGame(context.Context, *GetGameReq) (*GetGameRsp, error)
GameStart(context.Context, *GameStartReq) (*GameStartRsp, error)
GameStop(context.Context, *GameStopReq) (*GameStopRsp, error)
GiveApplications(context.Context, *GiveApplicationsReq) (*GiveApplicationsRsp, error)
@@ -172,6 +184,9 @@ func (UnimplementedEveningDetectiveServer) GetTeam(context.Context, *GetTeamReq)
func (UnimplementedEveningDetectiveServer) AddAction(context.Context, *AddActionReq) (*AddActionRsp, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddAction not implemented")
}
func (UnimplementedEveningDetectiveServer) GetGame(context.Context, *GetGameReq) (*GetGameRsp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetGame not implemented")
}
func (UnimplementedEveningDetectiveServer) GameStart(context.Context, *GameStartReq) (*GameStartRsp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GameStart not implemented")
}
@@ -302,6 +317,24 @@ func _EveningDetective_AddAction_Handler(srv interface{}, ctx context.Context, d
return interceptor(ctx, in, info, handler)
}
func _EveningDetective_GetGame_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetGameReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EveningDetectiveServer).GetGame(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: EveningDetective_GetGame_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EveningDetectiveServer).GetGame(ctx, req.(*GetGameReq))
}
return interceptor(ctx, in, info, handler)
}
func _EveningDetective_GameStart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GameStartReq)
if err := dec(in); err != nil {
@@ -387,6 +420,10 @@ var EveningDetective_ServiceDesc = grpc.ServiceDesc{
MethodName: "AddAction",
Handler: _EveningDetective_AddAction_Handler,
},
{
MethodName: "GetGame",
Handler: _EveningDetective_GetGame_Handler,
},
{
MethodName: "GameStart",
Handler: _EveningDetective_GameStart_Handler,