chore(api)!: updated grpc files
This commit is contained in:
@@ -346,6 +346,94 @@ func (x *GetCompetitionRequest) GetCompetitionId() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
type DeleteCompetitionRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
CompetitionId string `protobuf:"bytes,1,opt,name=competition_id,json=competitionId,proto3" json:"competition_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DeleteCompetitionRequest) Reset() {
|
||||
*x = DeleteCompetitionRequest{}
|
||||
mi := &file_api_proto_competition_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteCompetitionRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteCompetitionRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteCompetitionRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_proto_competition_proto_msgTypes[2]
|
||||
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 DeleteCompetitionRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteCompetitionRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_competition_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *DeleteCompetitionRequest) GetCompetitionId() string {
|
||||
if x != nil {
|
||||
return x.CompetitionId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type DeleteCompetitionResponse 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 *DeleteCompetitionResponse) Reset() {
|
||||
*x = DeleteCompetitionResponse{}
|
||||
mi := &file_api_proto_competition_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteCompetitionResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteCompetitionResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteCompetitionResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_proto_competition_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 DeleteCompetitionResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteCompetitionResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_competition_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *DeleteCompetitionResponse) GetSuccess() bool {
|
||||
if x != nil {
|
||||
return x.Success
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type ListCompetitionsRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
|
||||
@@ -359,7 +447,7 @@ type ListCompetitionsRequest struct {
|
||||
|
||||
func (x *ListCompetitionsRequest) Reset() {
|
||||
*x = ListCompetitionsRequest{}
|
||||
mi := &file_api_proto_competition_proto_msgTypes[2]
|
||||
mi := &file_api_proto_competition_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -371,7 +459,7 @@ func (x *ListCompetitionsRequest) String() string {
|
||||
func (*ListCompetitionsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListCompetitionsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_proto_competition_proto_msgTypes[2]
|
||||
mi := &file_api_proto_competition_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -384,7 +472,7 @@ func (x *ListCompetitionsRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ListCompetitionsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListCompetitionsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_competition_proto_rawDescGZIP(), []int{2}
|
||||
return file_api_proto_competition_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *ListCompetitionsRequest) GetPageSize() int32 {
|
||||
@@ -424,16 +512,16 @@ func (x *ListCompetitionsRequest) GetSearchQuery() string {
|
||||
|
||||
type ListCompetitionsResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
TotalCount int32 `protobuf:"varint,2,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"`
|
||||
NextPageToken int32 `protobuf:"varint,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
|
||||
Competitions []*Competition `protobuf:"bytes,1,rep,name=competitions,proto3" json:"competitions,omitempty"`
|
||||
TotalCount int32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"`
|
||||
NextPageToken int32 `protobuf:"varint,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
|
||||
Competitions []*Competition `protobuf:"bytes,3,rep,name=competitions,proto3" json:"competitions,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListCompetitionsResponse) Reset() {
|
||||
*x = ListCompetitionsResponse{}
|
||||
mi := &file_api_proto_competition_proto_msgTypes[3]
|
||||
mi := &file_api_proto_competition_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -445,7 +533,7 @@ func (x *ListCompetitionsResponse) String() string {
|
||||
func (*ListCompetitionsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListCompetitionsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_proto_competition_proto_msgTypes[3]
|
||||
mi := &file_api_proto_competition_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -458,7 +546,7 @@ func (x *ListCompetitionsResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ListCompetitionsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListCompetitionsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_competition_proto_rawDescGZIP(), []int{3}
|
||||
return file_api_proto_competition_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *ListCompetitionsResponse) GetTotalCount() int32 {
|
||||
@@ -492,7 +580,7 @@ type ChangeCompetitionStateRequest struct {
|
||||
|
||||
func (x *ChangeCompetitionStateRequest) Reset() {
|
||||
*x = ChangeCompetitionStateRequest{}
|
||||
mi := &file_api_proto_competition_proto_msgTypes[4]
|
||||
mi := &file_api_proto_competition_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -504,7 +592,7 @@ func (x *ChangeCompetitionStateRequest) String() string {
|
||||
func (*ChangeCompetitionStateRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ChangeCompetitionStateRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_proto_competition_proto_msgTypes[4]
|
||||
mi := &file_api_proto_competition_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -517,7 +605,7 @@ func (x *ChangeCompetitionStateRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ChangeCompetitionStateRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ChangeCompetitionStateRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_competition_proto_rawDescGZIP(), []int{4}
|
||||
return file_api_proto_competition_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *ChangeCompetitionStateRequest) GetCompetitionId() string {
|
||||
@@ -558,7 +646,11 @@ const file_api_proto_competition_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"_image_url\">\n" +
|
||||
"\x15GetCompetitionRequest\x12%\n" +
|
||||
"\x0ecompetition_id\x18\x01 \x01(\tR\rcompetitionId\"\x97\x02\n" +
|
||||
"\x0ecompetition_id\x18\x01 \x01(\tR\rcompetitionId\"A\n" +
|
||||
"\x18DeleteCompetitionRequest\x12%\n" +
|
||||
"\x0ecompetition_id\x18\x01 \x01(\tR\rcompetitionId\"5\n" +
|
||||
"\x19DeleteCompetitionResponse\x12\x18\n" +
|
||||
"\asuccess\x18\x01 \x01(\bR\asuccess\"\x97\x02\n" +
|
||||
"\x17ListCompetitionsRequest\x12\x1b\n" +
|
||||
"\tpage_size\x18\x01 \x01(\x05R\bpageSize\x12\x1d\n" +
|
||||
"\n" +
|
||||
@@ -570,10 +662,10 @@ const file_api_proto_competition_proto_rawDesc = "" +
|
||||
"\x11_is_participatingB\x0f\n" +
|
||||
"\r_search_query\"\xa1\x01\n" +
|
||||
"\x18ListCompetitionsResponse\x12\x1f\n" +
|
||||
"\vtotal_count\x18\x02 \x01(\x05R\n" +
|
||||
"\vtotal_count\x18\x01 \x01(\x05R\n" +
|
||||
"totalCount\x12&\n" +
|
||||
"\x0fnext_page_token\x18\x03 \x01(\x05R\rnextPageToken\x12<\n" +
|
||||
"\fcompetitions\x18\x01 \x03(\v2\x18.competition.CompetitionR\fcompetitions\"{\n" +
|
||||
"\x0fnext_page_token\x18\x02 \x01(\x05R\rnextPageToken\x12<\n" +
|
||||
"\fcompetitions\x18\x03 \x03(\v2\x18.competition.CompetitionR\fcompetitions\"{\n" +
|
||||
"\x1dChangeCompetitionStateRequest\x12%\n" +
|
||||
"\x0ecompetition_id\x18\x01 \x01(\tR\rcompetitionId\x123\n" +
|
||||
"\x05state\x18\x02 \x01(\x0e2\x1d.competition.CompetitionStateR\x05state*\xd4\x01\n" +
|
||||
@@ -591,9 +683,12 @@ const file_api_proto_competition_proto_rawDesc = "" +
|
||||
"\x0fCompetitionType\x12 \n" +
|
||||
"\x1cCOMPETITION_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n" +
|
||||
"\x1aCOMPETITION_TYPE_EDUCATIVE\x10\x01\x12 \n" +
|
||||
"\x1cCOMPETITION_TYPE_COMPETETIVE\x10\x022\xa5\x02\n" +
|
||||
"\x12CompetitionService\x12N\n" +
|
||||
"\x0eGetCompetition\x12\".competition.GetCompetitionRequest\x1a\x18.competition.Competition\x12_\n" +
|
||||
"\x1cCOMPETITION_TYPE_COMPETETIVE\x10\x022\x99\x04\n" +
|
||||
"\x12CompetitionService\x12G\n" +
|
||||
"\x11CreateCompetition\x12\x18.competition.Competition\x1a\x18.competition.Competition\x12N\n" +
|
||||
"\x0eGetCompetition\x12\".competition.GetCompetitionRequest\x1a\x18.competition.Competition\x12E\n" +
|
||||
"\x0fEditCompetition\x12\x18.competition.Competition\x1a\x18.competition.Competition\x12b\n" +
|
||||
"\x11DeleteCompetition\x12%.competition.DeleteCompetitionRequest\x1a&.competition.DeleteCompetitionResponse\x12_\n" +
|
||||
"\x10ListCompetitions\x12$.competition.ListCompetitionsRequest\x1a%.competition.ListCompetitionsResponse\x12^\n" +
|
||||
"\x16ChangeCompetitionState\x12*.competition.ChangeCompetitionStateRequest\x1a\x18.competition.CompetitionB\x15Z\x13pkg/api/competitionb\x06proto3"
|
||||
|
||||
@@ -610,37 +705,45 @@ func file_api_proto_competition_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_api_proto_competition_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
|
||||
var file_api_proto_competition_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_api_proto_competition_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_api_proto_competition_proto_goTypes = []any{
|
||||
(CompetitionState)(0), // 0: competition.CompetitionState
|
||||
(ParticipationType)(0), // 1: competition.ParticipationType
|
||||
(CompetitionType)(0), // 2: competition.CompetitionType
|
||||
(*Competition)(nil), // 3: competition.Competition
|
||||
(*GetCompetitionRequest)(nil), // 4: competition.GetCompetitionRequest
|
||||
(*ListCompetitionsRequest)(nil), // 5: competition.ListCompetitionsRequest
|
||||
(*ListCompetitionsResponse)(nil), // 6: competition.ListCompetitionsResponse
|
||||
(*ChangeCompetitionStateRequest)(nil), // 7: competition.ChangeCompetitionStateRequest
|
||||
(*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp
|
||||
(*DeleteCompetitionRequest)(nil), // 5: competition.DeleteCompetitionRequest
|
||||
(*DeleteCompetitionResponse)(nil), // 6: competition.DeleteCompetitionResponse
|
||||
(*ListCompetitionsRequest)(nil), // 7: competition.ListCompetitionsRequest
|
||||
(*ListCompetitionsResponse)(nil), // 8: competition.ListCompetitionsResponse
|
||||
(*ChangeCompetitionStateRequest)(nil), // 9: competition.ChangeCompetitionStateRequest
|
||||
(*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp
|
||||
}
|
||||
var file_api_proto_competition_proto_depIdxs = []int32{
|
||||
0, // 0: competition.Competition.state:type_name -> competition.CompetitionState
|
||||
8, // 1: competition.Competition.start_time:type_name -> google.protobuf.Timestamp
|
||||
8, // 2: competition.Competition.end_time:type_name -> google.protobuf.Timestamp
|
||||
10, // 1: competition.Competition.start_time:type_name -> google.protobuf.Timestamp
|
||||
10, // 2: competition.Competition.end_time:type_name -> google.protobuf.Timestamp
|
||||
2, // 3: competition.Competition.type:type_name -> competition.CompetitionType
|
||||
1, // 4: competition.Competition.participation_type:type_name -> competition.ParticipationType
|
||||
8, // 5: competition.Competition.created_at:type_name -> google.protobuf.Timestamp
|
||||
8, // 6: competition.Competition.updated_at:type_name -> google.protobuf.Timestamp
|
||||
10, // 5: competition.Competition.created_at:type_name -> google.protobuf.Timestamp
|
||||
10, // 6: competition.Competition.updated_at:type_name -> google.protobuf.Timestamp
|
||||
0, // 7: competition.ListCompetitionsRequest.state:type_name -> competition.CompetitionState
|
||||
3, // 8: competition.ListCompetitionsResponse.competitions:type_name -> competition.Competition
|
||||
0, // 9: competition.ChangeCompetitionStateRequest.state:type_name -> competition.CompetitionState
|
||||
4, // 10: competition.CompetitionService.GetCompetition:input_type -> competition.GetCompetitionRequest
|
||||
5, // 11: competition.CompetitionService.ListCompetitions:input_type -> competition.ListCompetitionsRequest
|
||||
7, // 12: competition.CompetitionService.ChangeCompetitionState:input_type -> competition.ChangeCompetitionStateRequest
|
||||
3, // 13: competition.CompetitionService.GetCompetition:output_type -> competition.Competition
|
||||
6, // 14: competition.CompetitionService.ListCompetitions:output_type -> competition.ListCompetitionsResponse
|
||||
3, // 15: competition.CompetitionService.ChangeCompetitionState:output_type -> competition.Competition
|
||||
13, // [13:16] is the sub-list for method output_type
|
||||
10, // [10:13] is the sub-list for method input_type
|
||||
3, // 10: competition.CompetitionService.CreateCompetition:input_type -> competition.Competition
|
||||
4, // 11: competition.CompetitionService.GetCompetition:input_type -> competition.GetCompetitionRequest
|
||||
3, // 12: competition.CompetitionService.EditCompetition:input_type -> competition.Competition
|
||||
5, // 13: competition.CompetitionService.DeleteCompetition:input_type -> competition.DeleteCompetitionRequest
|
||||
7, // 14: competition.CompetitionService.ListCompetitions:input_type -> competition.ListCompetitionsRequest
|
||||
9, // 15: competition.CompetitionService.ChangeCompetitionState:input_type -> competition.ChangeCompetitionStateRequest
|
||||
3, // 16: competition.CompetitionService.CreateCompetition:output_type -> competition.Competition
|
||||
3, // 17: competition.CompetitionService.GetCompetition:output_type -> competition.Competition
|
||||
3, // 18: competition.CompetitionService.EditCompetition:output_type -> competition.Competition
|
||||
6, // 19: competition.CompetitionService.DeleteCompetition:output_type -> competition.DeleteCompetitionResponse
|
||||
8, // 20: competition.CompetitionService.ListCompetitions:output_type -> competition.ListCompetitionsResponse
|
||||
3, // 21: competition.CompetitionService.ChangeCompetitionState:output_type -> competition.Competition
|
||||
16, // [16:22] is the sub-list for method output_type
|
||||
10, // [10:16] is the sub-list for method input_type
|
||||
10, // [10:10] is the sub-list for extension type_name
|
||||
10, // [10:10] is the sub-list for extension extendee
|
||||
0, // [0:10] is the sub-list for field type_name
|
||||
@@ -652,14 +755,14 @@ func file_api_proto_competition_proto_init() {
|
||||
return
|
||||
}
|
||||
file_api_proto_competition_proto_msgTypes[0].OneofWrappers = []any{}
|
||||
file_api_proto_competition_proto_msgTypes[2].OneofWrappers = []any{}
|
||||
file_api_proto_competition_proto_msgTypes[4].OneofWrappers = []any{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_api_proto_competition_proto_rawDesc), len(file_api_proto_competition_proto_rawDesc)),
|
||||
NumEnums: 3,
|
||||
NumMessages: 5,
|
||||
NumMessages: 7,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
@@ -19,7 +19,10 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
CompetitionService_CreateCompetition_FullMethodName = "/competition.CompetitionService/CreateCompetition"
|
||||
CompetitionService_GetCompetition_FullMethodName = "/competition.CompetitionService/GetCompetition"
|
||||
CompetitionService_EditCompetition_FullMethodName = "/competition.CompetitionService/EditCompetition"
|
||||
CompetitionService_DeleteCompetition_FullMethodName = "/competition.CompetitionService/DeleteCompetition"
|
||||
CompetitionService_ListCompetitions_FullMethodName = "/competition.CompetitionService/ListCompetitions"
|
||||
CompetitionService_ChangeCompetitionState_FullMethodName = "/competition.CompetitionService/ChangeCompetitionState"
|
||||
)
|
||||
@@ -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 CompetitionServiceClient interface {
|
||||
CreateCompetition(ctx context.Context, in *Competition, opts ...grpc.CallOption) (*Competition, error)
|
||||
GetCompetition(ctx context.Context, in *GetCompetitionRequest, opts ...grpc.CallOption) (*Competition, error)
|
||||
EditCompetition(ctx context.Context, in *Competition, opts ...grpc.CallOption) (*Competition, error)
|
||||
DeleteCompetition(ctx context.Context, in *DeleteCompetitionRequest, opts ...grpc.CallOption) (*DeleteCompetitionResponse, error)
|
||||
ListCompetitions(ctx context.Context, in *ListCompetitionsRequest, opts ...grpc.CallOption) (*ListCompetitionsResponse, error)
|
||||
ChangeCompetitionState(ctx context.Context, in *ChangeCompetitionStateRequest, opts ...grpc.CallOption) (*Competition, error)
|
||||
}
|
||||
@@ -41,6 +47,16 @@ func NewCompetitionServiceClient(cc grpc.ClientConnInterface) CompetitionService
|
||||
return &competitionServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *competitionServiceClient) CreateCompetition(ctx context.Context, in *Competition, opts ...grpc.CallOption) (*Competition, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Competition)
|
||||
err := c.cc.Invoke(ctx, CompetitionService_CreateCompetition_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *competitionServiceClient) GetCompetition(ctx context.Context, in *GetCompetitionRequest, opts ...grpc.CallOption) (*Competition, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Competition)
|
||||
@@ -51,6 +67,26 @@ func (c *competitionServiceClient) GetCompetition(ctx context.Context, in *GetCo
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *competitionServiceClient) EditCompetition(ctx context.Context, in *Competition, opts ...grpc.CallOption) (*Competition, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Competition)
|
||||
err := c.cc.Invoke(ctx, CompetitionService_EditCompetition_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *competitionServiceClient) DeleteCompetition(ctx context.Context, in *DeleteCompetitionRequest, opts ...grpc.CallOption) (*DeleteCompetitionResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(DeleteCompetitionResponse)
|
||||
err := c.cc.Invoke(ctx, CompetitionService_DeleteCompetition_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *competitionServiceClient) ListCompetitions(ctx context.Context, in *ListCompetitionsRequest, opts ...grpc.CallOption) (*ListCompetitionsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListCompetitionsResponse)
|
||||
@@ -75,7 +111,10 @@ func (c *competitionServiceClient) ChangeCompetitionState(ctx context.Context, i
|
||||
// All implementations must embed UnimplementedCompetitionServiceServer
|
||||
// for forward compatibility.
|
||||
type CompetitionServiceServer interface {
|
||||
CreateCompetition(context.Context, *Competition) (*Competition, error)
|
||||
GetCompetition(context.Context, *GetCompetitionRequest) (*Competition, error)
|
||||
EditCompetition(context.Context, *Competition) (*Competition, error)
|
||||
DeleteCompetition(context.Context, *DeleteCompetitionRequest) (*DeleteCompetitionResponse, error)
|
||||
ListCompetitions(context.Context, *ListCompetitionsRequest) (*ListCompetitionsResponse, error)
|
||||
ChangeCompetitionState(context.Context, *ChangeCompetitionStateRequest) (*Competition, error)
|
||||
mustEmbedUnimplementedCompetitionServiceServer()
|
||||
@@ -88,9 +127,18 @@ type CompetitionServiceServer interface {
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedCompetitionServiceServer struct{}
|
||||
|
||||
func (UnimplementedCompetitionServiceServer) CreateCompetition(context.Context, *Competition) (*Competition, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method CreateCompetition not implemented")
|
||||
}
|
||||
func (UnimplementedCompetitionServiceServer) GetCompetition(context.Context, *GetCompetitionRequest) (*Competition, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetCompetition not implemented")
|
||||
}
|
||||
func (UnimplementedCompetitionServiceServer) EditCompetition(context.Context, *Competition) (*Competition, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method EditCompetition not implemented")
|
||||
}
|
||||
func (UnimplementedCompetitionServiceServer) DeleteCompetition(context.Context, *DeleteCompetitionRequest) (*DeleteCompetitionResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteCompetition not implemented")
|
||||
}
|
||||
func (UnimplementedCompetitionServiceServer) ListCompetitions(context.Context, *ListCompetitionsRequest) (*ListCompetitionsResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListCompetitions not implemented")
|
||||
}
|
||||
@@ -118,6 +166,24 @@ func RegisterCompetitionServiceServer(s grpc.ServiceRegistrar, srv CompetitionSe
|
||||
s.RegisterService(&CompetitionService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _CompetitionService_CreateCompetition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Competition)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(CompetitionServiceServer).CreateCompetition(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: CompetitionService_CreateCompetition_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(CompetitionServiceServer).CreateCompetition(ctx, req.(*Competition))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _CompetitionService_GetCompetition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetCompetitionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -136,6 +202,42 @@ func _CompetitionService_GetCompetition_Handler(srv interface{}, ctx context.Con
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _CompetitionService_EditCompetition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Competition)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(CompetitionServiceServer).EditCompetition(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: CompetitionService_EditCompetition_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(CompetitionServiceServer).EditCompetition(ctx, req.(*Competition))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _CompetitionService_DeleteCompetition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteCompetitionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(CompetitionServiceServer).DeleteCompetition(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: CompetitionService_DeleteCompetition_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(CompetitionServiceServer).DeleteCompetition(ctx, req.(*DeleteCompetitionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _CompetitionService_ListCompetitions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListCompetitionsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -179,10 +281,22 @@ var CompetitionService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "competition.CompetitionService",
|
||||
HandlerType: (*CompetitionServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "CreateCompetition",
|
||||
Handler: _CompetitionService_CreateCompetition_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetCompetition",
|
||||
Handler: _CompetitionService_GetCompetition_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "EditCompetition",
|
||||
Handler: _CompetitionService_EditCompetition_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteCompetition",
|
||||
Handler: _CompetitionService_DeleteCompetition_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListCompetitions",
|
||||
Handler: _CompetitionService_ListCompetitions_Handler,
|
||||
|
||||
+14
-14
@@ -384,9 +384,9 @@ func (x *ListSubmissionsForReviewRequest) GetStatus() ReviewStatus {
|
||||
|
||||
type ListSubmissionsForReviewResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Submissions []*SubmissionSummary `protobuf:"bytes,1,rep,name=submissions,proto3" json:"submissions,omitempty"`
|
||||
TotalCount int32 `protobuf:"varint,2,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"`
|
||||
NextPageToken int32 `protobuf:"varint,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
|
||||
TotalCount int32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"`
|
||||
NextPageToken int32 `protobuf:"varint,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
|
||||
Submissions []*SubmissionSummary `protobuf:"bytes,3,rep,name=submissions,proto3" json:"submissions,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -421,13 +421,6 @@ func (*ListSubmissionsForReviewResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_review_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *ListSubmissionsForReviewResponse) GetSubmissions() []*SubmissionSummary {
|
||||
if x != nil {
|
||||
return x.Submissions
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ListSubmissionsForReviewResponse) GetTotalCount() int32 {
|
||||
if x != nil {
|
||||
return x.TotalCount
|
||||
@@ -442,6 +435,13 @@ func (x *ListSubmissionsForReviewResponse) GetNextPageToken() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListSubmissionsForReviewResponse) GetSubmissions() []*SubmissionSummary {
|
||||
if x != nil {
|
||||
return x.Submissions
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetSubmissionForReviewRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
SubmissionId string `protobuf:"bytes,1,opt,name=submission_id,json=submissionId,proto3" json:"submission_id,omitempty"`
|
||||
@@ -692,11 +692,11 @@ const file_api_proto_review_proto_rawDesc = "" +
|
||||
"page_token\x18\x02 \x01(\x05R\tpageToken\x121\n" +
|
||||
"\x06status\x18\x03 \x01(\x0e2\x14.review.ReviewStatusH\x00R\x06status\x88\x01\x01B\t\n" +
|
||||
"\a_status\"\xa8\x01\n" +
|
||||
" ListSubmissionsForReviewResponse\x12;\n" +
|
||||
"\vsubmissions\x18\x01 \x03(\v2\x19.review.SubmissionSummaryR\vsubmissions\x12\x1f\n" +
|
||||
"\vtotal_count\x18\x02 \x01(\x05R\n" +
|
||||
" ListSubmissionsForReviewResponse\x12\x1f\n" +
|
||||
"\vtotal_count\x18\x01 \x01(\x05R\n" +
|
||||
"totalCount\x12&\n" +
|
||||
"\x0fnext_page_token\x18\x03 \x01(\x05R\rnextPageToken\"D\n" +
|
||||
"\x0fnext_page_token\x18\x02 \x01(\x05R\rnextPageToken\x12;\n" +
|
||||
"\vsubmissions\x18\x03 \x03(\v2\x19.review.SubmissionSummaryR\vsubmissions\"D\n" +
|
||||
"\x1dGetSubmissionForReviewRequest\x12#\n" +
|
||||
"\rsubmission_id\x18\x01 \x01(\tR\fsubmissionId\"\xbc\x01\n" +
|
||||
"\x19EvaluateSubmissionRequest\x12#\n" +
|
||||
|
||||
@@ -474,9 +474,9 @@ func (x *ListSubmissionsRequest) GetStatus() SubmissionStatus {
|
||||
|
||||
type ListSubmissionsResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Submissions []*Submission `protobuf:"bytes,1,rep,name=submissions,proto3" json:"submissions,omitempty"`
|
||||
TotalCount int32 `protobuf:"varint,2,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"`
|
||||
NextPageToken int32 `protobuf:"varint,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
|
||||
Submissions []*Submission `protobuf:"bytes,1,rep,name=submissions,proto3" json:"submissions,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -511,13 +511,6 @@ func (*ListSubmissionsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_submission_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *ListSubmissionsResponse) GetSubmissions() []*Submission {
|
||||
if x != nil {
|
||||
return x.Submissions
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ListSubmissionsResponse) GetTotalCount() int32 {
|
||||
if x != nil {
|
||||
return x.TotalCount
|
||||
@@ -532,6 +525,13 @@ func (x *ListSubmissionsResponse) GetNextPageToken() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListSubmissionsResponse) GetSubmissions() []*Submission {
|
||||
if x != nil {
|
||||
return x.Submissions
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_api_proto_submission_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_api_proto_submission_proto_rawDesc = "" +
|
||||
@@ -569,11 +569,11 @@ const file_api_proto_submission_proto_rawDesc = "" +
|
||||
"\atask_id\x18\x04 \x01(\tR\x06taskId\x12\x17\n" +
|
||||
"\auser_id\x18\x05 \x01(\tR\x06userId\x124\n" +
|
||||
"\x06status\x18\x06 \x01(\x0e2\x1c.submission.SubmissionStatusR\x06status\"\x9c\x01\n" +
|
||||
"\x17ListSubmissionsResponse\x128\n" +
|
||||
"\vsubmissions\x18\x01 \x03(\v2\x16.submission.SubmissionR\vsubmissions\x12\x1f\n" +
|
||||
"\x17ListSubmissionsResponse\x12\x1f\n" +
|
||||
"\vtotal_count\x18\x02 \x01(\x05R\n" +
|
||||
"totalCount\x12&\n" +
|
||||
"\x0fnext_page_token\x18\x03 \x01(\x05R\rnextPageToken*\xd7\x01\n" +
|
||||
"\x0fnext_page_token\x18\x03 \x01(\x05R\rnextPageToken\x128\n" +
|
||||
"\vsubmissions\x18\x01 \x03(\v2\x16.submission.SubmissionR\vsubmissions*\xd7\x01\n" +
|
||||
"\x10SubmissionStatus\x12!\n" +
|
||||
"\x1dSUBMISSION_STATUS_UNSPECIFIED\x10\x00\x12\x1d\n" +
|
||||
"\x19SUBMISSION_STATUS_PENDING\x10\x01\x12$\n" +
|
||||
|
||||
+161
-41
@@ -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,
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user