chore(api)!: updated grpc files

This commit is contained in:
ITQ
2025-12-16 17:21:30 +03:00
parent 7f267f61f4
commit c9bdc488d7
12 changed files with 587 additions and 113 deletions
+161 -41
View File
@@ -294,6 +294,94 @@ func (x *GetTaskRequest) GetTaskId() string {
return ""
}
type DeleteTaskRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DeleteTaskRequest) Reset() {
*x = DeleteTaskRequest{}
mi := &file_api_proto_task_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DeleteTaskRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteTaskRequest) ProtoMessage() {}
func (x *DeleteTaskRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_task_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeleteTaskRequest.ProtoReflect.Descriptor instead.
func (*DeleteTaskRequest) Descriptor() ([]byte, []int) {
return file_api_proto_task_proto_rawDescGZIP(), []int{3}
}
func (x *DeleteTaskRequest) GetTaskId() string {
if x != nil {
return x.TaskId
}
return ""
}
type DeleteTaskResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DeleteTaskResponse) Reset() {
*x = DeleteTaskResponse{}
mi := &file_api_proto_task_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DeleteTaskResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteTaskResponse) ProtoMessage() {}
func (x *DeleteTaskResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_task_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeleteTaskResponse.ProtoReflect.Descriptor instead.
func (*DeleteTaskResponse) Descriptor() ([]byte, []int) {
return file_api_proto_task_proto_rawDescGZIP(), []int{4}
}
func (x *DeleteTaskResponse) GetSuccess() bool {
if x != nil {
return x.Success
}
return false
}
type ListCompetitionTasksRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
CompetitionId string `protobuf:"bytes,1,opt,name=competition_id,json=competitionId,proto3" json:"competition_id,omitempty"`
@@ -303,7 +391,7 @@ type ListCompetitionTasksRequest struct {
func (x *ListCompetitionTasksRequest) Reset() {
*x = ListCompetitionTasksRequest{}
mi := &file_api_proto_task_proto_msgTypes[3]
mi := &file_api_proto_task_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -315,7 +403,7 @@ func (x *ListCompetitionTasksRequest) String() string {
func (*ListCompetitionTasksRequest) ProtoMessage() {}
func (x *ListCompetitionTasksRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_task_proto_msgTypes[3]
mi := &file_api_proto_task_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -328,7 +416,7 @@ func (x *ListCompetitionTasksRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListCompetitionTasksRequest.ProtoReflect.Descriptor instead.
func (*ListCompetitionTasksRequest) Descriptor() ([]byte, []int) {
return file_api_proto_task_proto_rawDescGZIP(), []int{3}
return file_api_proto_task_proto_rawDescGZIP(), []int{5}
}
func (x *ListCompetitionTasksRequest) GetCompetitionId() string {
@@ -347,7 +435,7 @@ type ListCompetitionTasksResponse struct {
func (x *ListCompetitionTasksResponse) Reset() {
*x = ListCompetitionTasksResponse{}
mi := &file_api_proto_task_proto_msgTypes[4]
mi := &file_api_proto_task_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -359,7 +447,7 @@ func (x *ListCompetitionTasksResponse) String() string {
func (*ListCompetitionTasksResponse) ProtoMessage() {}
func (x *ListCompetitionTasksResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_task_proto_msgTypes[4]
mi := &file_api_proto_task_proto_msgTypes[6]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -372,7 +460,7 @@ func (x *ListCompetitionTasksResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListCompetitionTasksResponse.ProtoReflect.Descriptor instead.
func (*ListCompetitionTasksResponse) Descriptor() ([]byte, []int) {
return file_api_proto_task_proto_rawDescGZIP(), []int{4}
return file_api_proto_task_proto_rawDescGZIP(), []int{6}
}
func (x *ListCompetitionTasksResponse) GetTasks() []*Task {
@@ -385,13 +473,14 @@ func (x *ListCompetitionTasksResponse) GetTasks() []*Task {
type GetTaskAttachmentsRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
ShowPrivate *bool `protobuf:"varint,2,opt,name=show_private,json=showPrivate,proto3,oneof" json:"show_private,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetTaskAttachmentsRequest) Reset() {
*x = GetTaskAttachmentsRequest{}
mi := &file_api_proto_task_proto_msgTypes[5]
mi := &file_api_proto_task_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -403,7 +492,7 @@ func (x *GetTaskAttachmentsRequest) String() string {
func (*GetTaskAttachmentsRequest) ProtoMessage() {}
func (x *GetTaskAttachmentsRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_task_proto_msgTypes[5]
mi := &file_api_proto_task_proto_msgTypes[7]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -416,7 +505,7 @@ func (x *GetTaskAttachmentsRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetTaskAttachmentsRequest.ProtoReflect.Descriptor instead.
func (*GetTaskAttachmentsRequest) Descriptor() ([]byte, []int) {
return file_api_proto_task_proto_rawDescGZIP(), []int{5}
return file_api_proto_task_proto_rawDescGZIP(), []int{7}
}
func (x *GetTaskAttachmentsRequest) GetTaskId() string {
@@ -426,6 +515,13 @@ func (x *GetTaskAttachmentsRequest) GetTaskId() string {
return ""
}
func (x *GetTaskAttachmentsRequest) GetShowPrivate() bool {
if x != nil && x.ShowPrivate != nil {
return *x.ShowPrivate
}
return false
}
type GetTaskAttachmentsResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Attachments []*TaskAttachment `protobuf:"bytes,1,rep,name=attachments,proto3" json:"attachments,omitempty"`
@@ -435,7 +531,7 @@ type GetTaskAttachmentsResponse struct {
func (x *GetTaskAttachmentsResponse) Reset() {
*x = GetTaskAttachmentsResponse{}
mi := &file_api_proto_task_proto_msgTypes[6]
mi := &file_api_proto_task_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -447,7 +543,7 @@ func (x *GetTaskAttachmentsResponse) String() string {
func (*GetTaskAttachmentsResponse) ProtoMessage() {}
func (x *GetTaskAttachmentsResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_task_proto_msgTypes[6]
mi := &file_api_proto_task_proto_msgTypes[8]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -460,7 +556,7 @@ func (x *GetTaskAttachmentsResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetTaskAttachmentsResponse.ProtoReflect.Descriptor instead.
func (*GetTaskAttachmentsResponse) Descriptor() ([]byte, []int) {
return file_api_proto_task_proto_rawDescGZIP(), []int{6}
return file_api_proto_task_proto_rawDescGZIP(), []int{8}
}
func (x *GetTaskAttachmentsResponse) GetAttachments() []*TaskAttachment {
@@ -495,24 +591,39 @@ const file_api_proto_task_proto_rawDesc = "" +
"\bfile_url\x18\x02 \x01(\tR\afileUrl\x12\x1b\n" +
"\tis_public\x18\x03 \x01(\bR\bisPublic\")\n" +
"\x0eGetTaskRequest\x12\x17\n" +
"\atask_id\x18\x01 \x01(\tR\x06taskId\"D\n" +
"\atask_id\x18\x01 \x01(\tR\x06taskId\",\n" +
"\x11DeleteTaskRequest\x12\x17\n" +
"\atask_id\x18\x01 \x01(\tR\x06taskId\".\n" +
"\x12DeleteTaskResponse\x12\x18\n" +
"\asuccess\x18\x01 \x01(\bR\asuccess\"D\n" +
"\x1bListCompetitionTasksRequest\x12%\n" +
"\x0ecompetition_id\x18\x01 \x01(\tR\rcompetitionId\"@\n" +
"\x1cListCompetitionTasksResponse\x12 \n" +
"\x05tasks\x18\x01 \x03(\v2\n" +
".task.TaskR\x05tasks\"4\n" +
".task.TaskR\x05tasks\"m\n" +
"\x19GetTaskAttachmentsRequest\x12\x17\n" +
"\atask_id\x18\x01 \x01(\tR\x06taskId\"T\n" +
"\atask_id\x18\x01 \x01(\tR\x06taskId\x12&\n" +
"\fshow_private\x18\x02 \x01(\bH\x00R\vshowPrivate\x88\x01\x01B\x0f\n" +
"\r_show_private\"T\n" +
"\x1aGetTaskAttachmentsResponse\x126\n" +
"\vattachments\x18\x01 \x03(\v2\x14.task.TaskAttachmentR\vattachments*g\n" +
"\bTaskType\x12\x19\n" +
"\x15TASK_TYPE_UNSPECIFIED\x10\x00\x12\x13\n" +
"\x0fTASK_TYPE_INPUT\x10\x01\x12\x15\n" +
"\x11TASK_TYPE_CHECKER\x10\x02\x12\x14\n" +
"\x10TASK_TYPE_REVIEW\x10\x032\xf2\x01\n" +
"\vTaskService\x12+\n" +
"\x10TASK_TYPE_REVIEW\x10\x032\xfd\x02\n" +
"\vTaskService\x12$\n" +
"\n" +
"CreateTask\x12\n" +
".task.Task\x1a\n" +
".task.Task\x12+\n" +
"\aGetTask\x12\x14.task.GetTaskRequest\x1a\n" +
".task.Task\x12]\n" +
".task.Task\x12\"\n" +
"\bEditTask\x12\n" +
".task.Task\x1a\n" +
".task.Task\x12?\n" +
"\n" +
"DeleteTask\x12\x17.task.DeleteTaskRequest\x1a\x18.task.DeleteTaskResponse\x12]\n" +
"\x14ListCompetitionTasks\x12!.task.ListCompetitionTasksRequest\x1a\".task.ListCompetitionTasksResponse\x12W\n" +
"\x12GetTaskAttachments\x12\x1f.task.GetTaskAttachmentsRequest\x1a .task.GetTaskAttachmentsResponseB\x0eZ\fpkg/api/taskb\x06proto3"
@@ -529,35 +640,43 @@ func file_api_proto_task_proto_rawDescGZIP() []byte {
}
var file_api_proto_task_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_api_proto_task_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_api_proto_task_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_api_proto_task_proto_goTypes = []any{
(TaskType)(0), // 0: task.TaskType
(*Task)(nil), // 1: task.Task
(*TaskAttachment)(nil), // 2: task.TaskAttachment
(*GetTaskRequest)(nil), // 3: task.GetTaskRequest
(*ListCompetitionTasksRequest)(nil), // 4: task.ListCompetitionTasksRequest
(*ListCompetitionTasksResponse)(nil), // 5: task.ListCompetitionTasksResponse
(*GetTaskAttachmentsRequest)(nil), // 6: task.GetTaskAttachmentsRequest
(*GetTaskAttachmentsResponse)(nil), // 7: task.GetTaskAttachmentsResponse
(*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp
(*DeleteTaskRequest)(nil), // 4: task.DeleteTaskRequest
(*DeleteTaskResponse)(nil), // 5: task.DeleteTaskResponse
(*ListCompetitionTasksRequest)(nil), // 6: task.ListCompetitionTasksRequest
(*ListCompetitionTasksResponse)(nil), // 7: task.ListCompetitionTasksResponse
(*GetTaskAttachmentsRequest)(nil), // 8: task.GetTaskAttachmentsRequest
(*GetTaskAttachmentsResponse)(nil), // 9: task.GetTaskAttachmentsResponse
(*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp
}
var file_api_proto_task_proto_depIdxs = []int32{
0, // 0: task.Task.type:type_name -> task.TaskType
8, // 1: task.Task.created_at:type_name -> google.protobuf.Timestamp
8, // 2: task.Task.updated_at:type_name -> google.protobuf.Timestamp
1, // 3: task.ListCompetitionTasksResponse.tasks:type_name -> task.Task
2, // 4: task.GetTaskAttachmentsResponse.attachments:type_name -> task.TaskAttachment
3, // 5: task.TaskService.GetTask:input_type -> task.GetTaskRequest
4, // 6: task.TaskService.ListCompetitionTasks:input_type -> task.ListCompetitionTasksRequest
6, // 7: task.TaskService.GetTaskAttachments:input_type -> task.GetTaskAttachmentsRequest
1, // 8: task.TaskService.GetTask:output_type -> task.Task
5, // 9: task.TaskService.ListCompetitionTasks:output_type -> task.ListCompetitionTasksResponse
7, // 10: task.TaskService.GetTaskAttachments:output_type -> task.GetTaskAttachmentsResponse
8, // [8:11] is the sub-list for method output_type
5, // [5:8] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
0, // 0: task.Task.type:type_name -> task.TaskType
10, // 1: task.Task.created_at:type_name -> google.protobuf.Timestamp
10, // 2: task.Task.updated_at:type_name -> google.protobuf.Timestamp
1, // 3: task.ListCompetitionTasksResponse.tasks:type_name -> task.Task
2, // 4: task.GetTaskAttachmentsResponse.attachments:type_name -> task.TaskAttachment
1, // 5: task.TaskService.CreateTask:input_type -> task.Task
3, // 6: task.TaskService.GetTask:input_type -> task.GetTaskRequest
1, // 7: task.TaskService.EditTask:input_type -> task.Task
4, // 8: task.TaskService.DeleteTask:input_type -> task.DeleteTaskRequest
6, // 9: task.TaskService.ListCompetitionTasks:input_type -> task.ListCompetitionTasksRequest
8, // 10: task.TaskService.GetTaskAttachments:input_type -> task.GetTaskAttachmentsRequest
1, // 11: task.TaskService.CreateTask:output_type -> task.Task
1, // 12: task.TaskService.GetTask:output_type -> task.Task
1, // 13: task.TaskService.EditTask:output_type -> task.Task
5, // 14: task.TaskService.DeleteTask:output_type -> task.DeleteTaskResponse
7, // 15: task.TaskService.ListCompetitionTasks:output_type -> task.ListCompetitionTasksResponse
9, // 16: task.TaskService.GetTaskAttachments:output_type -> task.GetTaskAttachmentsResponse
11, // [11:17] is the sub-list for method output_type
5, // [5:11] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_api_proto_task_proto_init() }
@@ -565,13 +684,14 @@ func file_api_proto_task_proto_init() {
if File_api_proto_task_proto != nil {
return
}
file_api_proto_task_proto_msgTypes[7].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_api_proto_task_proto_rawDesc), len(file_api_proto_task_proto_rawDesc)),
NumEnums: 1,
NumMessages: 7,
NumMessages: 9,
NumExtensions: 0,
NumServices: 1,
},
+114
View File
@@ -19,7 +19,10 @@ import (
const _ = grpc.SupportPackageIsVersion9
const (
TaskService_CreateTask_FullMethodName = "/task.TaskService/CreateTask"
TaskService_GetTask_FullMethodName = "/task.TaskService/GetTask"
TaskService_EditTask_FullMethodName = "/task.TaskService/EditTask"
TaskService_DeleteTask_FullMethodName = "/task.TaskService/DeleteTask"
TaskService_ListCompetitionTasks_FullMethodName = "/task.TaskService/ListCompetitionTasks"
TaskService_GetTaskAttachments_FullMethodName = "/task.TaskService/GetTaskAttachments"
)
@@ -28,7 +31,10 @@ const (
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type TaskServiceClient interface {
CreateTask(ctx context.Context, in *Task, opts ...grpc.CallOption) (*Task, error)
GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*Task, error)
EditTask(ctx context.Context, in *Task, opts ...grpc.CallOption) (*Task, error)
DeleteTask(ctx context.Context, in *DeleteTaskRequest, opts ...grpc.CallOption) (*DeleteTaskResponse, error)
ListCompetitionTasks(ctx context.Context, in *ListCompetitionTasksRequest, opts ...grpc.CallOption) (*ListCompetitionTasksResponse, error)
GetTaskAttachments(ctx context.Context, in *GetTaskAttachmentsRequest, opts ...grpc.CallOption) (*GetTaskAttachmentsResponse, error)
}
@@ -41,6 +47,16 @@ func NewTaskServiceClient(cc grpc.ClientConnInterface) TaskServiceClient {
return &taskServiceClient{cc}
}
func (c *taskServiceClient) CreateTask(ctx context.Context, in *Task, opts ...grpc.CallOption) (*Task, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Task)
err := c.cc.Invoke(ctx, TaskService_CreateTask_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *taskServiceClient) GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*Task, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Task)
@@ -51,6 +67,26 @@ func (c *taskServiceClient) GetTask(ctx context.Context, in *GetTaskRequest, opt
return out, nil
}
func (c *taskServiceClient) EditTask(ctx context.Context, in *Task, opts ...grpc.CallOption) (*Task, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Task)
err := c.cc.Invoke(ctx, TaskService_EditTask_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *taskServiceClient) DeleteTask(ctx context.Context, in *DeleteTaskRequest, opts ...grpc.CallOption) (*DeleteTaskResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DeleteTaskResponse)
err := c.cc.Invoke(ctx, TaskService_DeleteTask_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *taskServiceClient) ListCompetitionTasks(ctx context.Context, in *ListCompetitionTasksRequest, opts ...grpc.CallOption) (*ListCompetitionTasksResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListCompetitionTasksResponse)
@@ -75,7 +111,10 @@ func (c *taskServiceClient) GetTaskAttachments(ctx context.Context, in *GetTaskA
// All implementations must embed UnimplementedTaskServiceServer
// for forward compatibility.
type TaskServiceServer interface {
CreateTask(context.Context, *Task) (*Task, error)
GetTask(context.Context, *GetTaskRequest) (*Task, error)
EditTask(context.Context, *Task) (*Task, error)
DeleteTask(context.Context, *DeleteTaskRequest) (*DeleteTaskResponse, error)
ListCompetitionTasks(context.Context, *ListCompetitionTasksRequest) (*ListCompetitionTasksResponse, error)
GetTaskAttachments(context.Context, *GetTaskAttachmentsRequest) (*GetTaskAttachmentsResponse, error)
mustEmbedUnimplementedTaskServiceServer()
@@ -88,9 +127,18 @@ type TaskServiceServer interface {
// pointer dereference when methods are called.
type UnimplementedTaskServiceServer struct{}
func (UnimplementedTaskServiceServer) CreateTask(context.Context, *Task) (*Task, error) {
return nil, status.Error(codes.Unimplemented, "method CreateTask not implemented")
}
func (UnimplementedTaskServiceServer) GetTask(context.Context, *GetTaskRequest) (*Task, error) {
return nil, status.Error(codes.Unimplemented, "method GetTask not implemented")
}
func (UnimplementedTaskServiceServer) EditTask(context.Context, *Task) (*Task, error) {
return nil, status.Error(codes.Unimplemented, "method EditTask not implemented")
}
func (UnimplementedTaskServiceServer) DeleteTask(context.Context, *DeleteTaskRequest) (*DeleteTaskResponse, error) {
return nil, status.Error(codes.Unimplemented, "method DeleteTask not implemented")
}
func (UnimplementedTaskServiceServer) ListCompetitionTasks(context.Context, *ListCompetitionTasksRequest) (*ListCompetitionTasksResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListCompetitionTasks not implemented")
}
@@ -118,6 +166,24 @@ func RegisterTaskServiceServer(s grpc.ServiceRegistrar, srv TaskServiceServer) {
s.RegisterService(&TaskService_ServiceDesc, srv)
}
func _TaskService_CreateTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Task)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TaskServiceServer).CreateTask(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: TaskService_CreateTask_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TaskServiceServer).CreateTask(ctx, req.(*Task))
}
return interceptor(ctx, in, info, handler)
}
func _TaskService_GetTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetTaskRequest)
if err := dec(in); err != nil {
@@ -136,6 +202,42 @@ func _TaskService_GetTask_Handler(srv interface{}, ctx context.Context, dec func
return interceptor(ctx, in, info, handler)
}
func _TaskService_EditTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Task)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TaskServiceServer).EditTask(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: TaskService_EditTask_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TaskServiceServer).EditTask(ctx, req.(*Task))
}
return interceptor(ctx, in, info, handler)
}
func _TaskService_DeleteTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteTaskRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TaskServiceServer).DeleteTask(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: TaskService_DeleteTask_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TaskServiceServer).DeleteTask(ctx, req.(*DeleteTaskRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TaskService_ListCompetitionTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListCompetitionTasksRequest)
if err := dec(in); err != nil {
@@ -179,10 +281,22 @@ var TaskService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "task.TaskService",
HandlerType: (*TaskServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateTask",
Handler: _TaskService_CreateTask_Handler,
},
{
MethodName: "GetTask",
Handler: _TaskService_GetTask_Handler,
},
{
MethodName: "EditTask",
Handler: _TaskService_EditTask_Handler,
},
{
MethodName: "DeleteTask",
Handler: _TaskService_DeleteTask_Handler,
},
{
MethodName: "ListCompetitionTasks",
Handler: _TaskService_ListCompetitionTasks_Handler,