chore: updated grpc stubs

This commit is contained in:
ITQ
2025-12-14 14:11:22 +03:00
parent 5636096c08
commit fe355677db
19 changed files with 4120 additions and 2131 deletions
+805
View File
@@ -0,0 +1,805 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.2
// source: api/proto/review.proto
package review
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ReviewStatus int32
const (
ReviewStatus_REVIEW_STATUS_UNSPECIFIED ReviewStatus = 0
ReviewStatus_REVIEW_STATUS_PENDING ReviewStatus = 1
ReviewStatus_REVIEW_STATUS_IN_REVIEW ReviewStatus = 2
ReviewStatus_REVIEW_STATUS_COMPLETED ReviewStatus = 3
ReviewStatus_REVIEW_STATUS_REJECTED ReviewStatus = 4
)
// Enum value maps for ReviewStatus.
var (
ReviewStatus_name = map[int32]string{
0: "REVIEW_STATUS_UNSPECIFIED",
1: "REVIEW_STATUS_PENDING",
2: "REVIEW_STATUS_IN_REVIEW",
3: "REVIEW_STATUS_COMPLETED",
4: "REVIEW_STATUS_REJECTED",
}
ReviewStatus_value = map[string]int32{
"REVIEW_STATUS_UNSPECIFIED": 0,
"REVIEW_STATUS_PENDING": 1,
"REVIEW_STATUS_IN_REVIEW": 2,
"REVIEW_STATUS_COMPLETED": 3,
"REVIEW_STATUS_REJECTED": 4,
}
)
func (x ReviewStatus) Enum() *ReviewStatus {
p := new(ReviewStatus)
*p = x
return p
}
func (x ReviewStatus) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ReviewStatus) Descriptor() protoreflect.EnumDescriptor {
return file_api_proto_review_proto_enumTypes[0].Descriptor()
}
func (ReviewStatus) Type() protoreflect.EnumType {
return &file_api_proto_review_proto_enumTypes[0]
}
func (x ReviewStatus) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ReviewStatus.Descriptor instead.
func (ReviewStatus) EnumDescriptor() ([]byte, []int) {
return file_api_proto_review_proto_rawDescGZIP(), []int{0}
}
type CriteriaMark struct {
state protoimpl.MessageState `protogen:"open.v1"`
Slug string `protobuf:"bytes,1,opt,name=slug,proto3" json:"slug,omitempty"`
Mark float64 `protobuf:"fixed64,2,opt,name=mark,proto3" json:"mark,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *CriteriaMark) Reset() {
*x = CriteriaMark{}
mi := &file_api_proto_review_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CriteriaMark) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CriteriaMark) ProtoMessage() {}
func (x *CriteriaMark) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_review_proto_msgTypes[0]
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 CriteriaMark.ProtoReflect.Descriptor instead.
func (*CriteriaMark) Descriptor() ([]byte, []int) {
return file_api_proto_review_proto_rawDescGZIP(), []int{0}
}
func (x *CriteriaMark) GetSlug() string {
if x != nil {
return x.Slug
}
return ""
}
func (x *CriteriaMark) GetMark() float64 {
if x != nil {
return x.Mark
}
return 0
}
type SubmissionSummary struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
CompetitionId string `protobuf:"bytes,2,opt,name=competition_id,json=competitionId,proto3" json:"competition_id,omitempty"`
TaskId string `protobuf:"bytes,3,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
CompetitionTitle string `protobuf:"bytes,4,opt,name=competition_title,json=competitionTitle,proto3" json:"competition_title,omitempty"`
TaskTitle string `protobuf:"bytes,5,opt,name=task_title,json=taskTitle,proto3" json:"task_title,omitempty"`
SubmittedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=submitted_at,json=submittedAt,proto3" json:"submitted_at,omitempty"`
ReviewStatus ReviewStatus `protobuf:"varint,7,opt,name=review_status,json=reviewStatus,proto3,enum=review.ReviewStatus" json:"review_status,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *SubmissionSummary) Reset() {
*x = SubmissionSummary{}
mi := &file_api_proto_review_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SubmissionSummary) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SubmissionSummary) ProtoMessage() {}
func (x *SubmissionSummary) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_review_proto_msgTypes[1]
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 SubmissionSummary.ProtoReflect.Descriptor instead.
func (*SubmissionSummary) Descriptor() ([]byte, []int) {
return file_api_proto_review_proto_rawDescGZIP(), []int{1}
}
func (x *SubmissionSummary) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *SubmissionSummary) GetCompetitionId() string {
if x != nil {
return x.CompetitionId
}
return ""
}
func (x *SubmissionSummary) GetTaskId() string {
if x != nil {
return x.TaskId
}
return ""
}
func (x *SubmissionSummary) GetCompetitionTitle() string {
if x != nil {
return x.CompetitionTitle
}
return ""
}
func (x *SubmissionSummary) GetTaskTitle() string {
if x != nil {
return x.TaskTitle
}
return ""
}
func (x *SubmissionSummary) GetSubmittedAt() *timestamppb.Timestamp {
if x != nil {
return x.SubmittedAt
}
return nil
}
func (x *SubmissionSummary) GetReviewStatus() ReviewStatus {
if x != nil {
return x.ReviewStatus
}
return ReviewStatus_REVIEW_STATUS_UNSPECIFIED
}
type SubmissionForReview struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
CompetitionId string `protobuf:"bytes,2,opt,name=competition_id,json=competitionId,proto3" json:"competition_id,omitempty"`
TaskId string `protobuf:"bytes,3,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"`
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
ReviewStatus ReviewStatus `protobuf:"varint,6,opt,name=review_status,json=reviewStatus,proto3,enum=review.ReviewStatus" json:"review_status,omitempty"`
SubmittedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=submitted_at,json=submittedAt,proto3" json:"submitted_at,omitempty"`
CheckedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=checked_at,json=checkedAt,proto3,oneof" json:"checked_at,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *SubmissionForReview) Reset() {
*x = SubmissionForReview{}
mi := &file_api_proto_review_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SubmissionForReview) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SubmissionForReview) ProtoMessage() {}
func (x *SubmissionForReview) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_review_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 SubmissionForReview.ProtoReflect.Descriptor instead.
func (*SubmissionForReview) Descriptor() ([]byte, []int) {
return file_api_proto_review_proto_rawDescGZIP(), []int{2}
}
func (x *SubmissionForReview) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *SubmissionForReview) GetCompetitionId() string {
if x != nil {
return x.CompetitionId
}
return ""
}
func (x *SubmissionForReview) GetTaskId() string {
if x != nil {
return x.TaskId
}
return ""
}
func (x *SubmissionForReview) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
func (x *SubmissionForReview) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *SubmissionForReview) GetReviewStatus() ReviewStatus {
if x != nil {
return x.ReviewStatus
}
return ReviewStatus_REVIEW_STATUS_UNSPECIFIED
}
func (x *SubmissionForReview) GetSubmittedAt() *timestamppb.Timestamp {
if x != nil {
return x.SubmittedAt
}
return nil
}
func (x *SubmissionForReview) GetCheckedAt() *timestamppb.Timestamp {
if x != nil {
return x.CheckedAt
}
return nil
}
type ListSubmissionsForReviewRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
PageToken int32 `protobuf:"varint,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
Status *ReviewStatus `protobuf:"varint,3,opt,name=status,proto3,enum=review.ReviewStatus,oneof" json:"status,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ListSubmissionsForReviewRequest) Reset() {
*x = ListSubmissionsForReviewRequest{}
mi := &file_api_proto_review_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ListSubmissionsForReviewRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListSubmissionsForReviewRequest) ProtoMessage() {}
func (x *ListSubmissionsForReviewRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_review_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 ListSubmissionsForReviewRequest.ProtoReflect.Descriptor instead.
func (*ListSubmissionsForReviewRequest) Descriptor() ([]byte, []int) {
return file_api_proto_review_proto_rawDescGZIP(), []int{3}
}
func (x *ListSubmissionsForReviewRequest) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
func (x *ListSubmissionsForReviewRequest) GetPageToken() int32 {
if x != nil {
return x.PageToken
}
return 0
}
func (x *ListSubmissionsForReviewRequest) GetStatus() ReviewStatus {
if x != nil && x.Status != nil {
return *x.Status
}
return ReviewStatus_REVIEW_STATUS_UNSPECIFIED
}
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"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ListSubmissionsForReviewResponse) Reset() {
*x = ListSubmissionsForReviewResponse{}
mi := &file_api_proto_review_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ListSubmissionsForReviewResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListSubmissionsForReviewResponse) ProtoMessage() {}
func (x *ListSubmissionsForReviewResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_review_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 ListSubmissionsForReviewResponse.ProtoReflect.Descriptor instead.
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
}
return 0
}
func (x *ListSubmissionsForReviewResponse) GetNextPageToken() int32 {
if x != nil {
return x.NextPageToken
}
return 0
}
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"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetSubmissionForReviewRequest) Reset() {
*x = GetSubmissionForReviewRequest{}
mi := &file_api_proto_review_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetSubmissionForReviewRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetSubmissionForReviewRequest) ProtoMessage() {}
func (x *GetSubmissionForReviewRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_review_proto_msgTypes[5]
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 GetSubmissionForReviewRequest.ProtoReflect.Descriptor instead.
func (*GetSubmissionForReviewRequest) Descriptor() ([]byte, []int) {
return file_api_proto_review_proto_rawDescGZIP(), []int{5}
}
func (x *GetSubmissionForReviewRequest) GetSubmissionId() string {
if x != nil {
return x.SubmissionId
}
return ""
}
type EvaluateSubmissionRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
SubmissionId string `protobuf:"bytes,1,opt,name=submission_id,json=submissionId,proto3" json:"submission_id,omitempty"`
EarnedPoints int32 `protobuf:"varint,2,opt,name=earned_points,json=earnedPoints,proto3" json:"earned_points,omitempty"`
ReviewerComment string `protobuf:"bytes,3,opt,name=reviewer_comment,json=reviewerComment,proto3" json:"reviewer_comment,omitempty"`
Marks []*CriteriaMark `protobuf:"bytes,4,rep,name=marks,proto3" json:"marks,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *EvaluateSubmissionRequest) Reset() {
*x = EvaluateSubmissionRequest{}
mi := &file_api_proto_review_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *EvaluateSubmissionRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EvaluateSubmissionRequest) ProtoMessage() {}
func (x *EvaluateSubmissionRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_review_proto_msgTypes[6]
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 EvaluateSubmissionRequest.ProtoReflect.Descriptor instead.
func (*EvaluateSubmissionRequest) Descriptor() ([]byte, []int) {
return file_api_proto_review_proto_rawDescGZIP(), []int{6}
}
func (x *EvaluateSubmissionRequest) GetSubmissionId() string {
if x != nil {
return x.SubmissionId
}
return ""
}
func (x *EvaluateSubmissionRequest) GetEarnedPoints() int32 {
if x != nil {
return x.EarnedPoints
}
return 0
}
func (x *EvaluateSubmissionRequest) GetReviewerComment() string {
if x != nil {
return x.ReviewerComment
}
return ""
}
func (x *EvaluateSubmissionRequest) GetMarks() []*CriteriaMark {
if x != nil {
return x.Marks
}
return nil
}
type EvaluateSubmissionResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
SubmissionId string `protobuf:"bytes,1,opt,name=submission_id,json=submissionId,proto3" json:"submission_id,omitempty"`
FinalScore int32 `protobuf:"varint,2,opt,name=final_score,json=finalScore,proto3" json:"final_score,omitempty"`
NewStatus ReviewStatus `protobuf:"varint,3,opt,name=new_status,json=newStatus,proto3,enum=review.ReviewStatus" json:"new_status,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *EvaluateSubmissionResponse) Reset() {
*x = EvaluateSubmissionResponse{}
mi := &file_api_proto_review_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *EvaluateSubmissionResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EvaluateSubmissionResponse) ProtoMessage() {}
func (x *EvaluateSubmissionResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_review_proto_msgTypes[7]
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 EvaluateSubmissionResponse.ProtoReflect.Descriptor instead.
func (*EvaluateSubmissionResponse) Descriptor() ([]byte, []int) {
return file_api_proto_review_proto_rawDescGZIP(), []int{7}
}
func (x *EvaluateSubmissionResponse) GetSubmissionId() string {
if x != nil {
return x.SubmissionId
}
return ""
}
func (x *EvaluateSubmissionResponse) GetFinalScore() int32 {
if x != nil {
return x.FinalScore
}
return 0
}
func (x *EvaluateSubmissionResponse) GetNewStatus() ReviewStatus {
if x != nil {
return x.NewStatus
}
return ReviewStatus_REVIEW_STATUS_UNSPECIFIED
}
type ReleaseSubmissionRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
SubmissionId string `protobuf:"bytes,1,opt,name=submission_id,json=submissionId,proto3" json:"submission_id,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ReleaseSubmissionRequest) Reset() {
*x = ReleaseSubmissionRequest{}
mi := &file_api_proto_review_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ReleaseSubmissionRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ReleaseSubmissionRequest) ProtoMessage() {}
func (x *ReleaseSubmissionRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_review_proto_msgTypes[8]
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 ReleaseSubmissionRequest.ProtoReflect.Descriptor instead.
func (*ReleaseSubmissionRequest) Descriptor() ([]byte, []int) {
return file_api_proto_review_proto_rawDescGZIP(), []int{8}
}
func (x *ReleaseSubmissionRequest) GetSubmissionId() string {
if x != nil {
return x.SubmissionId
}
return ""
}
var File_api_proto_review_proto protoreflect.FileDescriptor
const file_api_proto_review_proto_rawDesc = "" +
"\n" +
"\x16api/proto/review.proto\x12\x06review\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\"6\n" +
"\fCriteriaMark\x12\x12\n" +
"\x04slug\x18\x01 \x01(\tR\x04slug\x12\x12\n" +
"\x04mark\x18\x02 \x01(\x01R\x04mark\"\xa9\x02\n" +
"\x11SubmissionSummary\x12\x0e\n" +
"\x02id\x18\x01 \x01(\tR\x02id\x12%\n" +
"\x0ecompetition_id\x18\x02 \x01(\tR\rcompetitionId\x12\x17\n" +
"\atask_id\x18\x03 \x01(\tR\x06taskId\x12+\n" +
"\x11competition_title\x18\x04 \x01(\tR\x10competitionTitle\x12\x1d\n" +
"\n" +
"task_title\x18\x05 \x01(\tR\ttaskTitle\x12=\n" +
"\fsubmitted_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\vsubmittedAt\x129\n" +
"\rreview_status\x18\a \x01(\x0e2\x14.review.ReviewStatusR\freviewStatus\"\xea\x02\n" +
"\x13SubmissionForReview\x12\x0e\n" +
"\x02id\x18\x01 \x01(\tR\x02id\x12%\n" +
"\x0ecompetition_id\x18\x02 \x01(\tR\rcompetitionId\x12\x17\n" +
"\atask_id\x18\x03 \x01(\tR\x06taskId\x12\x18\n" +
"\acontent\x18\x04 \x01(\tR\acontent\x12 \n" +
"\vdescription\x18\x05 \x01(\tR\vdescription\x129\n" +
"\rreview_status\x18\x06 \x01(\x0e2\x14.review.ReviewStatusR\freviewStatus\x12=\n" +
"\fsubmitted_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\vsubmittedAt\x12>\n" +
"\n" +
"checked_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampH\x00R\tcheckedAt\x88\x01\x01B\r\n" +
"\v_checked_at\"\x9b\x01\n" +
"\x1fListSubmissionsForReviewRequest\x12\x1b\n" +
"\tpage_size\x18\x01 \x01(\x05R\bpageSize\x12\x1d\n" +
"\n" +
"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" +
"totalCount\x12&\n" +
"\x0fnext_page_token\x18\x03 \x01(\x05R\rnextPageToken\"D\n" +
"\x1dGetSubmissionForReviewRequest\x12#\n" +
"\rsubmission_id\x18\x01 \x01(\tR\fsubmissionId\"\xbc\x01\n" +
"\x19EvaluateSubmissionRequest\x12#\n" +
"\rsubmission_id\x18\x01 \x01(\tR\fsubmissionId\x12#\n" +
"\rearned_points\x18\x02 \x01(\x05R\fearnedPoints\x12)\n" +
"\x10reviewer_comment\x18\x03 \x01(\tR\x0freviewerComment\x12*\n" +
"\x05marks\x18\x04 \x03(\v2\x14.review.CriteriaMarkR\x05marks\"\x97\x01\n" +
"\x1aEvaluateSubmissionResponse\x12#\n" +
"\rsubmission_id\x18\x01 \x01(\tR\fsubmissionId\x12\x1f\n" +
"\vfinal_score\x18\x02 \x01(\x05R\n" +
"finalScore\x123\n" +
"\n" +
"new_status\x18\x03 \x01(\x0e2\x14.review.ReviewStatusR\tnewStatus\"?\n" +
"\x18ReleaseSubmissionRequest\x12#\n" +
"\rsubmission_id\x18\x01 \x01(\tR\fsubmissionId*\x9e\x01\n" +
"\fReviewStatus\x12\x1d\n" +
"\x19REVIEW_STATUS_UNSPECIFIED\x10\x00\x12\x19\n" +
"\x15REVIEW_STATUS_PENDING\x10\x01\x12\x1b\n" +
"\x17REVIEW_STATUS_IN_REVIEW\x10\x02\x12\x1b\n" +
"\x17REVIEW_STATUS_COMPLETED\x10\x03\x12\x1a\n" +
"\x16REVIEW_STATUS_REJECTED\x10\x042\x88\x03\n" +
"\rReviewService\x12m\n" +
"\x18ListSubmissionsForReview\x12'.review.ListSubmissionsForReviewRequest\x1a(.review.ListSubmissionsForReviewResponse\x12\\\n" +
"\x16GetSubmissionForReview\x12%.review.GetSubmissionForReviewRequest\x1a\x1b.review.SubmissionForReview\x12[\n" +
"\x12EvaluateSubmission\x12!.review.EvaluateSubmissionRequest\x1a\".review.EvaluateSubmissionResponse\x12M\n" +
"\x11ReleaseSubmission\x12 .review.ReleaseSubmissionRequest\x1a\x16.google.protobuf.EmptyB\x10Z\x0epkg/api/reviewb\x06proto3"
var (
file_api_proto_review_proto_rawDescOnce sync.Once
file_api_proto_review_proto_rawDescData []byte
)
func file_api_proto_review_proto_rawDescGZIP() []byte {
file_api_proto_review_proto_rawDescOnce.Do(func() {
file_api_proto_review_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_api_proto_review_proto_rawDesc), len(file_api_proto_review_proto_rawDesc)))
})
return file_api_proto_review_proto_rawDescData
}
var file_api_proto_review_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_api_proto_review_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_api_proto_review_proto_goTypes = []any{
(ReviewStatus)(0), // 0: review.ReviewStatus
(*CriteriaMark)(nil), // 1: review.CriteriaMark
(*SubmissionSummary)(nil), // 2: review.SubmissionSummary
(*SubmissionForReview)(nil), // 3: review.SubmissionForReview
(*ListSubmissionsForReviewRequest)(nil), // 4: review.ListSubmissionsForReviewRequest
(*ListSubmissionsForReviewResponse)(nil), // 5: review.ListSubmissionsForReviewResponse
(*GetSubmissionForReviewRequest)(nil), // 6: review.GetSubmissionForReviewRequest
(*EvaluateSubmissionRequest)(nil), // 7: review.EvaluateSubmissionRequest
(*EvaluateSubmissionResponse)(nil), // 8: review.EvaluateSubmissionResponse
(*ReleaseSubmissionRequest)(nil), // 9: review.ReleaseSubmissionRequest
(*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp
(*emptypb.Empty)(nil), // 11: google.protobuf.Empty
}
var file_api_proto_review_proto_depIdxs = []int32{
10, // 0: review.SubmissionSummary.submitted_at:type_name -> google.protobuf.Timestamp
0, // 1: review.SubmissionSummary.review_status:type_name -> review.ReviewStatus
0, // 2: review.SubmissionForReview.review_status:type_name -> review.ReviewStatus
10, // 3: review.SubmissionForReview.submitted_at:type_name -> google.protobuf.Timestamp
10, // 4: review.SubmissionForReview.checked_at:type_name -> google.protobuf.Timestamp
0, // 5: review.ListSubmissionsForReviewRequest.status:type_name -> review.ReviewStatus
2, // 6: review.ListSubmissionsForReviewResponse.submissions:type_name -> review.SubmissionSummary
1, // 7: review.EvaluateSubmissionRequest.marks:type_name -> review.CriteriaMark
0, // 8: review.EvaluateSubmissionResponse.new_status:type_name -> review.ReviewStatus
4, // 9: review.ReviewService.ListSubmissionsForReview:input_type -> review.ListSubmissionsForReviewRequest
6, // 10: review.ReviewService.GetSubmissionForReview:input_type -> review.GetSubmissionForReviewRequest
7, // 11: review.ReviewService.EvaluateSubmission:input_type -> review.EvaluateSubmissionRequest
9, // 12: review.ReviewService.ReleaseSubmission:input_type -> review.ReleaseSubmissionRequest
5, // 13: review.ReviewService.ListSubmissionsForReview:output_type -> review.ListSubmissionsForReviewResponse
3, // 14: review.ReviewService.GetSubmissionForReview:output_type -> review.SubmissionForReview
8, // 15: review.ReviewService.EvaluateSubmission:output_type -> review.EvaluateSubmissionResponse
11, // 16: review.ReviewService.ReleaseSubmission:output_type -> google.protobuf.Empty
13, // [13:17] is the sub-list for method output_type
9, // [9:13] is the sub-list for method input_type
9, // [9:9] is the sub-list for extension type_name
9, // [9:9] is the sub-list for extension extendee
0, // [0:9] is the sub-list for field type_name
}
func init() { file_api_proto_review_proto_init() }
func file_api_proto_review_proto_init() {
if File_api_proto_review_proto != nil {
return
}
file_api_proto_review_proto_msgTypes[2].OneofWrappers = []any{}
file_api_proto_review_proto_msgTypes[3].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_api_proto_review_proto_rawDesc), len(file_api_proto_review_proto_rawDesc)),
NumEnums: 1,
NumMessages: 9,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_api_proto_review_proto_goTypes,
DependencyIndexes: file_api_proto_review_proto_depIdxs,
EnumInfos: file_api_proto_review_proto_enumTypes,
MessageInfos: file_api_proto_review_proto_msgTypes,
}.Build()
File_api_proto_review_proto = out.File
file_api_proto_review_proto_goTypes = nil
file_api_proto_review_proto_depIdxs = nil
}
+236
View File
@@ -0,0 +1,236 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.0
// - protoc v6.33.2
// source: api/proto/review.proto
package review
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
ReviewService_ListSubmissionsForReview_FullMethodName = "/review.ReviewService/ListSubmissionsForReview"
ReviewService_GetSubmissionForReview_FullMethodName = "/review.ReviewService/GetSubmissionForReview"
ReviewService_EvaluateSubmission_FullMethodName = "/review.ReviewService/EvaluateSubmission"
ReviewService_ReleaseSubmission_FullMethodName = "/review.ReviewService/ReleaseSubmission"
)
// ReviewServiceClient is the client API for ReviewService service.
//
// 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 ReviewServiceClient interface {
ListSubmissionsForReview(ctx context.Context, in *ListSubmissionsForReviewRequest, opts ...grpc.CallOption) (*ListSubmissionsForReviewResponse, error)
GetSubmissionForReview(ctx context.Context, in *GetSubmissionForReviewRequest, opts ...grpc.CallOption) (*SubmissionForReview, error)
EvaluateSubmission(ctx context.Context, in *EvaluateSubmissionRequest, opts ...grpc.CallOption) (*EvaluateSubmissionResponse, error)
ReleaseSubmission(ctx context.Context, in *ReleaseSubmissionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type reviewServiceClient struct {
cc grpc.ClientConnInterface
}
func NewReviewServiceClient(cc grpc.ClientConnInterface) ReviewServiceClient {
return &reviewServiceClient{cc}
}
func (c *reviewServiceClient) ListSubmissionsForReview(ctx context.Context, in *ListSubmissionsForReviewRequest, opts ...grpc.CallOption) (*ListSubmissionsForReviewResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListSubmissionsForReviewResponse)
err := c.cc.Invoke(ctx, ReviewService_ListSubmissionsForReview_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *reviewServiceClient) GetSubmissionForReview(ctx context.Context, in *GetSubmissionForReviewRequest, opts ...grpc.CallOption) (*SubmissionForReview, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SubmissionForReview)
err := c.cc.Invoke(ctx, ReviewService_GetSubmissionForReview_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *reviewServiceClient) EvaluateSubmission(ctx context.Context, in *EvaluateSubmissionRequest, opts ...grpc.CallOption) (*EvaluateSubmissionResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(EvaluateSubmissionResponse)
err := c.cc.Invoke(ctx, ReviewService_EvaluateSubmission_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *reviewServiceClient) ReleaseSubmission(ctx context.Context, in *ReleaseSubmissionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, ReviewService_ReleaseSubmission_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// ReviewServiceServer is the server API for ReviewService service.
// All implementations must embed UnimplementedReviewServiceServer
// for forward compatibility.
type ReviewServiceServer interface {
ListSubmissionsForReview(context.Context, *ListSubmissionsForReviewRequest) (*ListSubmissionsForReviewResponse, error)
GetSubmissionForReview(context.Context, *GetSubmissionForReviewRequest) (*SubmissionForReview, error)
EvaluateSubmission(context.Context, *EvaluateSubmissionRequest) (*EvaluateSubmissionResponse, error)
ReleaseSubmission(context.Context, *ReleaseSubmissionRequest) (*emptypb.Empty, error)
mustEmbedUnimplementedReviewServiceServer()
}
// UnimplementedReviewServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedReviewServiceServer struct{}
func (UnimplementedReviewServiceServer) ListSubmissionsForReview(context.Context, *ListSubmissionsForReviewRequest) (*ListSubmissionsForReviewResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListSubmissionsForReview not implemented")
}
func (UnimplementedReviewServiceServer) GetSubmissionForReview(context.Context, *GetSubmissionForReviewRequest) (*SubmissionForReview, error) {
return nil, status.Error(codes.Unimplemented, "method GetSubmissionForReview not implemented")
}
func (UnimplementedReviewServiceServer) EvaluateSubmission(context.Context, *EvaluateSubmissionRequest) (*EvaluateSubmissionResponse, error) {
return nil, status.Error(codes.Unimplemented, "method EvaluateSubmission not implemented")
}
func (UnimplementedReviewServiceServer) ReleaseSubmission(context.Context, *ReleaseSubmissionRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method ReleaseSubmission not implemented")
}
func (UnimplementedReviewServiceServer) mustEmbedUnimplementedReviewServiceServer() {}
func (UnimplementedReviewServiceServer) testEmbeddedByValue() {}
// UnsafeReviewServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ReviewServiceServer will
// result in compilation errors.
type UnsafeReviewServiceServer interface {
mustEmbedUnimplementedReviewServiceServer()
}
func RegisterReviewServiceServer(s grpc.ServiceRegistrar, srv ReviewServiceServer) {
// If the following call panics, it indicates UnimplementedReviewServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&ReviewService_ServiceDesc, srv)
}
func _ReviewService_ListSubmissionsForReview_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListSubmissionsForReviewRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReviewServiceServer).ListSubmissionsForReview(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ReviewService_ListSubmissionsForReview_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReviewServiceServer).ListSubmissionsForReview(ctx, req.(*ListSubmissionsForReviewRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ReviewService_GetSubmissionForReview_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSubmissionForReviewRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReviewServiceServer).GetSubmissionForReview(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ReviewService_GetSubmissionForReview_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReviewServiceServer).GetSubmissionForReview(ctx, req.(*GetSubmissionForReviewRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ReviewService_EvaluateSubmission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EvaluateSubmissionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReviewServiceServer).EvaluateSubmission(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ReviewService_EvaluateSubmission_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReviewServiceServer).EvaluateSubmission(ctx, req.(*EvaluateSubmissionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ReviewService_ReleaseSubmission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReleaseSubmissionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReviewServiceServer).ReleaseSubmission(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ReviewService_ReleaseSubmission_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReviewServiceServer).ReleaseSubmission(ctx, req.(*ReleaseSubmissionRequest))
}
return interceptor(ctx, in, info, handler)
}
// ReviewService_ServiceDesc is the grpc.ServiceDesc for ReviewService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ReviewService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "review.ReviewService",
HandlerType: (*ReviewServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListSubmissionsForReview",
Handler: _ReviewService_ListSubmissionsForReview_Handler,
},
{
MethodName: "GetSubmissionForReview",
Handler: _ReviewService_GetSubmissionForReview_Handler,
},
{
MethodName: "EvaluateSubmission",
Handler: _ReviewService_EvaluateSubmission_Handler,
},
{
MethodName: "ReleaseSubmission",
Handler: _ReviewService_ReleaseSubmission_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "api/proto/review.proto",
}