generated from VLADIMIR/template
add play
This commit is contained in:
@@ -52,6 +52,7 @@ const (
|
||||
EveningDetectiveServer_UpdateGame_FullMethodName = "/crabs.evening_detective_server.EveningDetectiveServer/UpdateGame"
|
||||
EveningDetectiveServer_StartGame_FullMethodName = "/crabs.evening_detective_server.EveningDetectiveServer/StartGame"
|
||||
EveningDetectiveServer_PauseGame_FullMethodName = "/crabs.evening_detective_server.EveningDetectiveServer/PauseGame"
|
||||
EveningDetectiveServer_PlayGame_FullMethodName = "/crabs.evening_detective_server.EveningDetectiveServer/PlayGame"
|
||||
EveningDetectiveServer_FinishGame_FullMethodName = "/crabs.evening_detective_server.EveningDetectiveServer/FinishGame"
|
||||
EveningDetectiveServer_ResetGame_FullMethodName = "/crabs.evening_detective_server.EveningDetectiveServer/ResetGame"
|
||||
EveningDetectiveServer_DeleteGame_FullMethodName = "/crabs.evening_detective_server.EveningDetectiveServer/DeleteGame"
|
||||
@@ -100,6 +101,7 @@ type EveningDetectiveServerClient interface {
|
||||
UpdateGame(ctx context.Context, in *UpdateGameReq, opts ...grpc.CallOption) (*UpdateGameRsp, error)
|
||||
StartGame(ctx context.Context, in *StartGameReq, opts ...grpc.CallOption) (*StartGameRsp, error)
|
||||
PauseGame(ctx context.Context, in *PauseGameReq, opts ...grpc.CallOption) (*PauseGameRsp, error)
|
||||
PlayGame(ctx context.Context, in *PlayGameReq, opts ...grpc.CallOption) (*PlayGameRsp, error)
|
||||
FinishGame(ctx context.Context, in *FinishGameReq, opts ...grpc.CallOption) (*FinishGameRsp, error)
|
||||
ResetGame(ctx context.Context, in *ResetGameReq, opts ...grpc.CallOption) (*ResetGameRsp, error)
|
||||
DeleteGame(ctx context.Context, in *DeleteGameReq, opts ...grpc.CallOption) (*DeleteGameRsp, error)
|
||||
@@ -440,6 +442,16 @@ func (c *eveningDetectiveServerClient) PauseGame(ctx context.Context, in *PauseG
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *eveningDetectiveServerClient) PlayGame(ctx context.Context, in *PlayGameReq, opts ...grpc.CallOption) (*PlayGameRsp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PlayGameRsp)
|
||||
err := c.cc.Invoke(ctx, EveningDetectiveServer_PlayGame_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *eveningDetectiveServerClient) FinishGame(ctx context.Context, in *FinishGameReq, opts ...grpc.CallOption) (*FinishGameRsp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(FinishGameRsp)
|
||||
@@ -576,6 +588,7 @@ type EveningDetectiveServerServer interface {
|
||||
UpdateGame(context.Context, *UpdateGameReq) (*UpdateGameRsp, error)
|
||||
StartGame(context.Context, *StartGameReq) (*StartGameRsp, error)
|
||||
PauseGame(context.Context, *PauseGameReq) (*PauseGameRsp, error)
|
||||
PlayGame(context.Context, *PlayGameReq) (*PlayGameRsp, error)
|
||||
FinishGame(context.Context, *FinishGameReq) (*FinishGameRsp, error)
|
||||
ResetGame(context.Context, *ResetGameReq) (*ResetGameRsp, error)
|
||||
DeleteGame(context.Context, *DeleteGameReq) (*DeleteGameRsp, error)
|
||||
@@ -692,6 +705,9 @@ func (UnimplementedEveningDetectiveServerServer) StartGame(context.Context, *Sta
|
||||
func (UnimplementedEveningDetectiveServerServer) PauseGame(context.Context, *PauseGameReq) (*PauseGameRsp, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method PauseGame not implemented")
|
||||
}
|
||||
func (UnimplementedEveningDetectiveServerServer) PlayGame(context.Context, *PlayGameReq) (*PlayGameRsp, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method PlayGame not implemented")
|
||||
}
|
||||
func (UnimplementedEveningDetectiveServerServer) FinishGame(context.Context, *FinishGameReq) (*FinishGameRsp, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method FinishGame not implemented")
|
||||
}
|
||||
@@ -1320,6 +1336,24 @@ func _EveningDetectiveServer_PauseGame_Handler(srv interface{}, ctx context.Cont
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _EveningDetectiveServer_PlayGame_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PlayGameReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(EveningDetectiveServerServer).PlayGame(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: EveningDetectiveServer_PlayGame_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(EveningDetectiveServerServer).PlayGame(ctx, req.(*PlayGameReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _EveningDetectiveServer_FinishGame_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FinishGameReq)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -1635,6 +1669,10 @@ var EveningDetectiveServer_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "PauseGame",
|
||||
Handler: _EveningDetectiveServer_PauseGame_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "PlayGame",
|
||||
Handler: _EveningDetectiveServer_PlayGame_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "FinishGame",
|
||||
Handler: _EveningDetectiveServer_FinishGame_Handler,
|
||||
|
||||
Reference in New Issue
Block a user