This commit is contained in:
2025-06-17 03:10:31 +07:00
parent be8e7fa482
commit 9cc6646fe3
15 changed files with 432 additions and 131 deletions
+47 -10
View File
@@ -19,16 +19,17 @@ import (
const _ = grpc.SupportPackageIsVersion7
const (
EveningDetective_Ping_FullMethodName = "/crabs.evening_detective.EveningDetective/Ping"
EveningDetective_AddTeams_FullMethodName = "/crabs.evening_detective.EveningDetective/AddTeams"
EveningDetective_GetTeams_FullMethodName = "/crabs.evening_detective.EveningDetective/GetTeams"
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"
EveningDetective_Ping_FullMethodName = "/crabs.evening_detective.EveningDetective/Ping"
EveningDetective_AddTeams_FullMethodName = "/crabs.evening_detective.EveningDetective/AddTeams"
EveningDetective_GetTeams_FullMethodName = "/crabs.evening_detective.EveningDetective/GetTeams"
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"
EveningDetective_DownloadTeamsQrCodesFile_FullMethodName = "/crabs.evening_detective.EveningDetective/DownloadTeamsQrCodesFile"
)
// EveningDetectiveClient is the client API for EveningDetective service.
@@ -45,6 +46,7 @@ type EveningDetectiveClient interface {
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)
DownloadTeamsQrCodesFile(ctx context.Context, in *DownloadTeamsQrCodesFileReq, opts ...grpc.CallOption) (*DownloadTeamsQrCodesFileRsp, error)
}
type eveningDetectiveClient struct {
@@ -145,6 +147,15 @@ func (c *eveningDetectiveClient) GiveApplications(ctx context.Context, in *GiveA
return out, nil
}
func (c *eveningDetectiveClient) DownloadTeamsQrCodesFile(ctx context.Context, in *DownloadTeamsQrCodesFileReq, opts ...grpc.CallOption) (*DownloadTeamsQrCodesFileRsp, error) {
out := new(DownloadTeamsQrCodesFileRsp)
err := c.cc.Invoke(ctx, EveningDetective_DownloadTeamsQrCodesFile_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// EveningDetectiveServer is the server API for EveningDetective service.
// All implementations must embed UnimplementedEveningDetectiveServer
// for forward compatibility
@@ -159,6 +170,7 @@ type EveningDetectiveServer interface {
GameStart(context.Context, *GameStartReq) (*GameStartRsp, error)
GameStop(context.Context, *GameStopReq) (*GameStopRsp, error)
GiveApplications(context.Context, *GiveApplicationsReq) (*GiveApplicationsRsp, error)
DownloadTeamsQrCodesFile(context.Context, *DownloadTeamsQrCodesFileReq) (*DownloadTeamsQrCodesFileRsp, error)
mustEmbedUnimplementedEveningDetectiveServer()
}
@@ -196,6 +208,9 @@ func (UnimplementedEveningDetectiveServer) GameStop(context.Context, *GameStopRe
func (UnimplementedEveningDetectiveServer) GiveApplications(context.Context, *GiveApplicationsReq) (*GiveApplicationsRsp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GiveApplications not implemented")
}
func (UnimplementedEveningDetectiveServer) DownloadTeamsQrCodesFile(context.Context, *DownloadTeamsQrCodesFileReq) (*DownloadTeamsQrCodesFileRsp, error) {
return nil, status.Errorf(codes.Unimplemented, "method DownloadTeamsQrCodesFile not implemented")
}
func (UnimplementedEveningDetectiveServer) mustEmbedUnimplementedEveningDetectiveServer() {}
// UnsafeEveningDetectiveServer may be embedded to opt out of forward compatibility for this service.
@@ -389,6 +404,24 @@ func _EveningDetective_GiveApplications_Handler(srv interface{}, ctx context.Con
return interceptor(ctx, in, info, handler)
}
func _EveningDetective_DownloadTeamsQrCodesFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DownloadTeamsQrCodesFileReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EveningDetectiveServer).DownloadTeamsQrCodesFile(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: EveningDetective_DownloadTeamsQrCodesFile_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EveningDetectiveServer).DownloadTeamsQrCodesFile(ctx, req.(*DownloadTeamsQrCodesFileReq))
}
return interceptor(ctx, in, info, handler)
}
// EveningDetective_ServiceDesc is the grpc.ServiceDesc for EveningDetective service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -436,6 +469,10 @@ var EveningDetective_ServiceDesc = grpc.ServiceDesc{
MethodName: "GiveApplications",
Handler: _EveningDetective_GiveApplications_Handler,
},
{
MethodName: "DownloadTeamsQrCodesFile",
Handler: _EveningDetective_DownloadTeamsQrCodesFile_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "main.proto",