add delete last action

This commit is contained in:
2026-07-28 00:09:29 +07:00
parent 65763a3e10
commit 5a5b36e44d
5 changed files with 334 additions and 52 deletions
+38
View File
@@ -57,6 +57,7 @@ const (
EveningDetectiveServer_GiveTeamApplications_FullMethodName = "/crabs.evening_detective_server.EveningDetectiveServer/GiveTeamApplications"
EveningDetectiveServer_GetTeamActions_FullMethodName = "/crabs.evening_detective_server.EveningDetectiveServer/GetTeamActions"
EveningDetectiveServer_AddTeamAction_FullMethodName = "/crabs.evening_detective_server.EveningDetectiveServer/AddTeamAction"
EveningDetectiveServer_DeleteLastTeamAction_FullMethodName = "/crabs.evening_detective_server.EveningDetectiveServer/DeleteLastTeamAction"
)
// EveningDetectiveServerClient is the client API for EveningDetectiveServer service.
@@ -100,6 +101,7 @@ type EveningDetectiveServerClient interface {
GiveTeamApplications(ctx context.Context, in *GiveTeamApplicationsReq, opts ...grpc.CallOption) (*GiveTeamApplicationsRsp, error)
GetTeamActions(ctx context.Context, in *GetTeamActionsReq, opts ...grpc.CallOption) (*GetTeamActionsRsp, error)
AddTeamAction(ctx context.Context, in *AddTeamActionReq, opts ...grpc.CallOption) (*AddTeamActionRsp, error)
DeleteLastTeamAction(ctx context.Context, in *DeleteLastTeamActionReq, opts ...grpc.CallOption) (*DeleteLastTeamActionRsp, error)
}
type eveningDetectiveServerClient struct {
@@ -480,6 +482,16 @@ func (c *eveningDetectiveServerClient) AddTeamAction(ctx context.Context, in *Ad
return out, nil
}
func (c *eveningDetectiveServerClient) DeleteLastTeamAction(ctx context.Context, in *DeleteLastTeamActionReq, opts ...grpc.CallOption) (*DeleteLastTeamActionRsp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DeleteLastTeamActionRsp)
err := c.cc.Invoke(ctx, EveningDetectiveServer_DeleteLastTeamAction_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// EveningDetectiveServerServer is the server API for EveningDetectiveServer service.
// All implementations must embed UnimplementedEveningDetectiveServerServer
// for forward compatibility.
@@ -521,6 +533,7 @@ type EveningDetectiveServerServer interface {
GiveTeamApplications(context.Context, *GiveTeamApplicationsReq) (*GiveTeamApplicationsRsp, error)
GetTeamActions(context.Context, *GetTeamActionsReq) (*GetTeamActionsRsp, error)
AddTeamAction(context.Context, *AddTeamActionReq) (*AddTeamActionRsp, error)
DeleteLastTeamAction(context.Context, *DeleteLastTeamActionReq) (*DeleteLastTeamActionRsp, error)
mustEmbedUnimplementedEveningDetectiveServerServer()
}
@@ -642,6 +655,9 @@ func (UnimplementedEveningDetectiveServerServer) GetTeamActions(context.Context,
func (UnimplementedEveningDetectiveServerServer) AddTeamAction(context.Context, *AddTeamActionReq) (*AddTeamActionRsp, error) {
return nil, status.Error(codes.Unimplemented, "method AddTeamAction not implemented")
}
func (UnimplementedEveningDetectiveServerServer) DeleteLastTeamAction(context.Context, *DeleteLastTeamActionReq) (*DeleteLastTeamActionRsp, error) {
return nil, status.Error(codes.Unimplemented, "method DeleteLastTeamAction not implemented")
}
func (UnimplementedEveningDetectiveServerServer) mustEmbedUnimplementedEveningDetectiveServerServer() {
}
func (UnimplementedEveningDetectiveServerServer) testEmbeddedByValue() {}
@@ -1330,6 +1346,24 @@ func _EveningDetectiveServer_AddTeamAction_Handler(srv interface{}, ctx context.
return interceptor(ctx, in, info, handler)
}
func _EveningDetectiveServer_DeleteLastTeamAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteLastTeamActionReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EveningDetectiveServerServer).DeleteLastTeamAction(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: EveningDetectiveServer_DeleteLastTeamAction_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EveningDetectiveServerServer).DeleteLastTeamAction(ctx, req.(*DeleteLastTeamActionReq))
}
return interceptor(ctx, in, info, handler)
}
// EveningDetectiveServer_ServiceDesc is the grpc.ServiceDesc for EveningDetectiveServer service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -1485,6 +1519,10 @@ var EveningDetectiveServer_ServiceDesc = grpc.ServiceDesc{
MethodName: "AddTeamAction",
Handler: _EveningDetectiveServer_AddTeamAction_Handler,
},
{
MethodName: "DeleteLastTeamAction",
Handler: _EveningDetectiveServer_DeleteLastTeamAction_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "main.proto",