chore(api)!: improvements in contract
This commit is contained in:
@@ -0,0 +1,468 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v6.33.2
|
||||
// source: api/proto/achievements.proto
|
||||
|
||||
package achievements
|
||||
|
||||
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 Achievement struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
|
||||
IconUrl string `protobuf:"bytes,4,opt,name=icon_url,json=iconUrl,proto3" json:"icon_url,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Achievement) Reset() {
|
||||
*x = Achievement{}
|
||||
mi := &file_api_proto_achievements_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Achievement) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Achievement) ProtoMessage() {}
|
||||
|
||||
func (x *Achievement) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_proto_achievements_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 Achievement.ProtoReflect.Descriptor instead.
|
||||
func (*Achievement) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_achievements_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Achievement) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Achievement) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Achievement) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Achievement) GetIconUrl() string {
|
||||
if x != nil {
|
||||
return x.IconUrl
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type AchievementUser struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Achievement *Achievement `protobuf:"bytes,1,opt,name=achievement,proto3" json:"achievement,omitempty"`
|
||||
ReceivedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=received_at,json=receivedAt,proto3" json:"received_at,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AchievementUser) Reset() {
|
||||
*x = AchievementUser{}
|
||||
mi := &file_api_proto_achievements_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *AchievementUser) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AchievementUser) ProtoMessage() {}
|
||||
|
||||
func (x *AchievementUser) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_proto_achievements_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 AchievementUser.ProtoReflect.Descriptor instead.
|
||||
func (*AchievementUser) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_achievements_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *AchievementUser) GetAchievement() *Achievement {
|
||||
if x != nil {
|
||||
return x.Achievement
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *AchievementUser) GetReceivedAt() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.ReceivedAt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetAchievementRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetAchievementRequest) Reset() {
|
||||
*x = GetAchievementRequest{}
|
||||
mi := &file_api_proto_achievements_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetAchievementRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetAchievementRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetAchievementRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_proto_achievements_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 GetAchievementRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetAchievementRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_achievements_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *GetAchievementRequest) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type DeleteAchievementRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
AchievementId string `protobuf:"bytes,1,opt,name=achievement_id,json=achievementId,proto3" json:"achievement_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DeleteAchievementRequest) Reset() {
|
||||
*x = DeleteAchievementRequest{}
|
||||
mi := &file_api_proto_achievements_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteAchievementRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteAchievementRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteAchievementRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_proto_achievements_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 DeleteAchievementRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteAchievementRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_achievements_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *DeleteAchievementRequest) GetAchievementId() string {
|
||||
if x != nil {
|
||||
return x.AchievementId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ListAchievementsResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Achievements []*Achievement `protobuf:"bytes,1,rep,name=achievements,proto3" json:"achievements,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListAchievementsResponse) Reset() {
|
||||
*x = ListAchievementsResponse{}
|
||||
mi := &file_api_proto_achievements_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListAchievementsResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListAchievementsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListAchievementsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_proto_achievements_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 ListAchievementsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListAchievementsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_achievements_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *ListAchievementsResponse) GetAchievements() []*Achievement {
|
||||
if x != nil {
|
||||
return x.Achievements
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetUserAchievementsRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetUserAchievementsRequest) Reset() {
|
||||
*x = GetUserAchievementsRequest{}
|
||||
mi := &file_api_proto_achievements_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetUserAchievementsRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetUserAchievementsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetUserAchievementsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_proto_achievements_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 GetUserAchievementsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetUserAchievementsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_achievements_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *GetUserAchievementsRequest) GetUserId() string {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetUserAchievementsResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserAchievements []*AchievementUser `protobuf:"bytes,1,rep,name=user_achievements,json=userAchievements,proto3" json:"user_achievements,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetUserAchievementsResponse) Reset() {
|
||||
*x = GetUserAchievementsResponse{}
|
||||
mi := &file_api_proto_achievements_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetUserAchievementsResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetUserAchievementsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetUserAchievementsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_proto_achievements_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 GetUserAchievementsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetUserAchievementsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_achievements_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *GetUserAchievementsResponse) GetUserAchievements() []*AchievementUser {
|
||||
if x != nil {
|
||||
return x.UserAchievements
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_api_proto_achievements_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_api_proto_achievements_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x1capi/proto/achievements.proto\x12\fachievements\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\"n\n" +
|
||||
"\vAchievement\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" +
|
||||
"\x04name\x18\x02 \x01(\tR\x04name\x12 \n" +
|
||||
"\vdescription\x18\x03 \x01(\tR\vdescription\x12\x19\n" +
|
||||
"\bicon_url\x18\x04 \x01(\tR\aiconUrl\"\x8b\x01\n" +
|
||||
"\x0fAchievementUser\x12;\n" +
|
||||
"\vachievement\x18\x01 \x01(\v2\x19.achievements.AchievementR\vachievement\x12;\n" +
|
||||
"\vreceived_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\n" +
|
||||
"receivedAt\"'\n" +
|
||||
"\x15GetAchievementRequest\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\"A\n" +
|
||||
"\x18DeleteAchievementRequest\x12%\n" +
|
||||
"\x0eachievement_id\x18\x01 \x01(\tR\rachievementId\"Y\n" +
|
||||
"\x18ListAchievementsResponse\x12=\n" +
|
||||
"\fachievements\x18\x01 \x03(\v2\x19.achievements.AchievementR\fachievements\"5\n" +
|
||||
"\x1aGetUserAchievementsRequest\x12\x17\n" +
|
||||
"\auser_id\x18\x01 \x01(\tR\x06userId\"i\n" +
|
||||
"\x1bGetUserAchievementsResponse\x12J\n" +
|
||||
"\x11user_achievements\x18\x01 \x03(\v2\x1d.achievements.AchievementUserR\x10userAchievements2\x90\x04\n" +
|
||||
"\x13AchievementsService\x12I\n" +
|
||||
"\x11CreateAchievement\x12\x19.achievements.Achievement\x1a\x19.achievements.Achievement\x12P\n" +
|
||||
"\x0eGetAchievement\x12#.achievements.GetAchievementRequest\x1a\x19.achievements.Achievement\x12G\n" +
|
||||
"\x0fEditAchievement\x12\x19.achievements.Achievement\x1a\x19.achievements.Achievement\x12S\n" +
|
||||
"\x11DeleteAchievement\x12&.achievements.DeleteAchievementRequest\x1a\x16.google.protobuf.Empty\x12R\n" +
|
||||
"\x10ListAchievements\x12\x16.google.protobuf.Empty\x1a&.achievements.ListAchievementsResponse\x12j\n" +
|
||||
"\x13GetUserAchievements\x12(.achievements.GetUserAchievementsRequest\x1a).achievements.GetUserAchievementsResponseB\x16Z\x14pkg/api/achievementsb\x06proto3"
|
||||
|
||||
var (
|
||||
file_api_proto_achievements_proto_rawDescOnce sync.Once
|
||||
file_api_proto_achievements_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_api_proto_achievements_proto_rawDescGZIP() []byte {
|
||||
file_api_proto_achievements_proto_rawDescOnce.Do(func() {
|
||||
file_api_proto_achievements_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_api_proto_achievements_proto_rawDesc), len(file_api_proto_achievements_proto_rawDesc)))
|
||||
})
|
||||
return file_api_proto_achievements_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_api_proto_achievements_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_api_proto_achievements_proto_goTypes = []any{
|
||||
(*Achievement)(nil), // 0: achievements.Achievement
|
||||
(*AchievementUser)(nil), // 1: achievements.AchievementUser
|
||||
(*GetAchievementRequest)(nil), // 2: achievements.GetAchievementRequest
|
||||
(*DeleteAchievementRequest)(nil), // 3: achievements.DeleteAchievementRequest
|
||||
(*ListAchievementsResponse)(nil), // 4: achievements.ListAchievementsResponse
|
||||
(*GetUserAchievementsRequest)(nil), // 5: achievements.GetUserAchievementsRequest
|
||||
(*GetUserAchievementsResponse)(nil), // 6: achievements.GetUserAchievementsResponse
|
||||
(*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp
|
||||
(*emptypb.Empty)(nil), // 8: google.protobuf.Empty
|
||||
}
|
||||
var file_api_proto_achievements_proto_depIdxs = []int32{
|
||||
0, // 0: achievements.AchievementUser.achievement:type_name -> achievements.Achievement
|
||||
7, // 1: achievements.AchievementUser.received_at:type_name -> google.protobuf.Timestamp
|
||||
0, // 2: achievements.ListAchievementsResponse.achievements:type_name -> achievements.Achievement
|
||||
1, // 3: achievements.GetUserAchievementsResponse.user_achievements:type_name -> achievements.AchievementUser
|
||||
0, // 4: achievements.AchievementsService.CreateAchievement:input_type -> achievements.Achievement
|
||||
2, // 5: achievements.AchievementsService.GetAchievement:input_type -> achievements.GetAchievementRequest
|
||||
0, // 6: achievements.AchievementsService.EditAchievement:input_type -> achievements.Achievement
|
||||
3, // 7: achievements.AchievementsService.DeleteAchievement:input_type -> achievements.DeleteAchievementRequest
|
||||
8, // 8: achievements.AchievementsService.ListAchievements:input_type -> google.protobuf.Empty
|
||||
5, // 9: achievements.AchievementsService.GetUserAchievements:input_type -> achievements.GetUserAchievementsRequest
|
||||
0, // 10: achievements.AchievementsService.CreateAchievement:output_type -> achievements.Achievement
|
||||
0, // 11: achievements.AchievementsService.GetAchievement:output_type -> achievements.Achievement
|
||||
0, // 12: achievements.AchievementsService.EditAchievement:output_type -> achievements.Achievement
|
||||
8, // 13: achievements.AchievementsService.DeleteAchievement:output_type -> google.protobuf.Empty
|
||||
4, // 14: achievements.AchievementsService.ListAchievements:output_type -> achievements.ListAchievementsResponse
|
||||
6, // 15: achievements.AchievementsService.GetUserAchievements:output_type -> achievements.GetUserAchievementsResponse
|
||||
10, // [10:16] is the sub-list for method output_type
|
||||
4, // [4:10] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_api_proto_achievements_proto_init() }
|
||||
func file_api_proto_achievements_proto_init() {
|
||||
if File_api_proto_achievements_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_api_proto_achievements_proto_rawDesc), len(file_api_proto_achievements_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 7,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_api_proto_achievements_proto_goTypes,
|
||||
DependencyIndexes: file_api_proto_achievements_proto_depIdxs,
|
||||
MessageInfos: file_api_proto_achievements_proto_msgTypes,
|
||||
}.Build()
|
||||
File_api_proto_achievements_proto = out.File
|
||||
file_api_proto_achievements_proto_goTypes = nil
|
||||
file_api_proto_achievements_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,312 @@
|
||||
// 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/achievements.proto
|
||||
|
||||
package achievements
|
||||
|
||||
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 (
|
||||
AchievementsService_CreateAchievement_FullMethodName = "/achievements.AchievementsService/CreateAchievement"
|
||||
AchievementsService_GetAchievement_FullMethodName = "/achievements.AchievementsService/GetAchievement"
|
||||
AchievementsService_EditAchievement_FullMethodName = "/achievements.AchievementsService/EditAchievement"
|
||||
AchievementsService_DeleteAchievement_FullMethodName = "/achievements.AchievementsService/DeleteAchievement"
|
||||
AchievementsService_ListAchievements_FullMethodName = "/achievements.AchievementsService/ListAchievements"
|
||||
AchievementsService_GetUserAchievements_FullMethodName = "/achievements.AchievementsService/GetUserAchievements"
|
||||
)
|
||||
|
||||
// AchievementsServiceClient is the client API for AchievementsService 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 AchievementsServiceClient interface {
|
||||
CreateAchievement(ctx context.Context, in *Achievement, opts ...grpc.CallOption) (*Achievement, error)
|
||||
GetAchievement(ctx context.Context, in *GetAchievementRequest, opts ...grpc.CallOption) (*Achievement, error)
|
||||
EditAchievement(ctx context.Context, in *Achievement, opts ...grpc.CallOption) (*Achievement, error)
|
||||
DeleteAchievement(ctx context.Context, in *DeleteAchievementRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
ListAchievements(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListAchievementsResponse, error)
|
||||
GetUserAchievements(ctx context.Context, in *GetUserAchievementsRequest, opts ...grpc.CallOption) (*GetUserAchievementsResponse, error)
|
||||
}
|
||||
|
||||
type achievementsServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAchievementsServiceClient(cc grpc.ClientConnInterface) AchievementsServiceClient {
|
||||
return &achievementsServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *achievementsServiceClient) CreateAchievement(ctx context.Context, in *Achievement, opts ...grpc.CallOption) (*Achievement, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Achievement)
|
||||
err := c.cc.Invoke(ctx, AchievementsService_CreateAchievement_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *achievementsServiceClient) GetAchievement(ctx context.Context, in *GetAchievementRequest, opts ...grpc.CallOption) (*Achievement, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Achievement)
|
||||
err := c.cc.Invoke(ctx, AchievementsService_GetAchievement_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *achievementsServiceClient) EditAchievement(ctx context.Context, in *Achievement, opts ...grpc.CallOption) (*Achievement, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Achievement)
|
||||
err := c.cc.Invoke(ctx, AchievementsService_EditAchievement_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *achievementsServiceClient) DeleteAchievement(ctx context.Context, in *DeleteAchievementRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, AchievementsService_DeleteAchievement_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *achievementsServiceClient) ListAchievements(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListAchievementsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListAchievementsResponse)
|
||||
err := c.cc.Invoke(ctx, AchievementsService_ListAchievements_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *achievementsServiceClient) GetUserAchievements(ctx context.Context, in *GetUserAchievementsRequest, opts ...grpc.CallOption) (*GetUserAchievementsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetUserAchievementsResponse)
|
||||
err := c.cc.Invoke(ctx, AchievementsService_GetUserAchievements_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AchievementsServiceServer is the server API for AchievementsService service.
|
||||
// All implementations must embed UnimplementedAchievementsServiceServer
|
||||
// for forward compatibility.
|
||||
type AchievementsServiceServer interface {
|
||||
CreateAchievement(context.Context, *Achievement) (*Achievement, error)
|
||||
GetAchievement(context.Context, *GetAchievementRequest) (*Achievement, error)
|
||||
EditAchievement(context.Context, *Achievement) (*Achievement, error)
|
||||
DeleteAchievement(context.Context, *DeleteAchievementRequest) (*emptypb.Empty, error)
|
||||
ListAchievements(context.Context, *emptypb.Empty) (*ListAchievementsResponse, error)
|
||||
GetUserAchievements(context.Context, *GetUserAchievementsRequest) (*GetUserAchievementsResponse, error)
|
||||
mustEmbedUnimplementedAchievementsServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedAchievementsServiceServer 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 UnimplementedAchievementsServiceServer struct{}
|
||||
|
||||
func (UnimplementedAchievementsServiceServer) CreateAchievement(context.Context, *Achievement) (*Achievement, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method CreateAchievement not implemented")
|
||||
}
|
||||
func (UnimplementedAchievementsServiceServer) GetAchievement(context.Context, *GetAchievementRequest) (*Achievement, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetAchievement not implemented")
|
||||
}
|
||||
func (UnimplementedAchievementsServiceServer) EditAchievement(context.Context, *Achievement) (*Achievement, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method EditAchievement not implemented")
|
||||
}
|
||||
func (UnimplementedAchievementsServiceServer) DeleteAchievement(context.Context, *DeleteAchievementRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteAchievement not implemented")
|
||||
}
|
||||
func (UnimplementedAchievementsServiceServer) ListAchievements(context.Context, *emptypb.Empty) (*ListAchievementsResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListAchievements not implemented")
|
||||
}
|
||||
func (UnimplementedAchievementsServiceServer) GetUserAchievements(context.Context, *GetUserAchievementsRequest) (*GetUserAchievementsResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetUserAchievements not implemented")
|
||||
}
|
||||
func (UnimplementedAchievementsServiceServer) mustEmbedUnimplementedAchievementsServiceServer() {}
|
||||
func (UnimplementedAchievementsServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeAchievementsServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to AchievementsServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeAchievementsServiceServer interface {
|
||||
mustEmbedUnimplementedAchievementsServiceServer()
|
||||
}
|
||||
|
||||
func RegisterAchievementsServiceServer(s grpc.ServiceRegistrar, srv AchievementsServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedAchievementsServiceServer 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(&AchievementsService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _AchievementsService_CreateAchievement_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Achievement)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AchievementsServiceServer).CreateAchievement(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AchievementsService_CreateAchievement_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AchievementsServiceServer).CreateAchievement(ctx, req.(*Achievement))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AchievementsService_GetAchievement_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetAchievementRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AchievementsServiceServer).GetAchievement(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AchievementsService_GetAchievement_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AchievementsServiceServer).GetAchievement(ctx, req.(*GetAchievementRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AchievementsService_EditAchievement_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Achievement)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AchievementsServiceServer).EditAchievement(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AchievementsService_EditAchievement_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AchievementsServiceServer).EditAchievement(ctx, req.(*Achievement))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AchievementsService_DeleteAchievement_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteAchievementRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AchievementsServiceServer).DeleteAchievement(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AchievementsService_DeleteAchievement_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AchievementsServiceServer).DeleteAchievement(ctx, req.(*DeleteAchievementRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AchievementsService_ListAchievements_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(emptypb.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AchievementsServiceServer).ListAchievements(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AchievementsService_ListAchievements_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AchievementsServiceServer).ListAchievements(ctx, req.(*emptypb.Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AchievementsService_GetUserAchievements_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetUserAchievementsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AchievementsServiceServer).GetUserAchievements(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AchievementsService_GetUserAchievements_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AchievementsServiceServer).GetUserAchievements(ctx, req.(*GetUserAchievementsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// AchievementsService_ServiceDesc is the grpc.ServiceDesc for AchievementsService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var AchievementsService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "achievements.AchievementsService",
|
||||
HandlerType: (*AchievementsServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "CreateAchievement",
|
||||
Handler: _AchievementsService_CreateAchievement_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetAchievement",
|
||||
Handler: _AchievementsService_GetAchievement_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "EditAchievement",
|
||||
Handler: _AchievementsService_EditAchievement_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteAchievement",
|
||||
Handler: _AchievementsService_DeleteAchievement_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListAchievements",
|
||||
Handler: _AchievementsService_ListAchievements_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetUserAchievements",
|
||||
Handler: _AchievementsService_GetUserAchievements_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "api/proto/achievements.proto",
|
||||
}
|
||||
+221
-69
@@ -322,18 +322,123 @@ func (x *SubmissionForReview) GetCheckedAt() *timestamppb.Timestamp {
|
||||
return nil
|
||||
}
|
||||
|
||||
type ValidateReviewTokenRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ValidateReviewTokenRequest) Reset() {
|
||||
*x = ValidateReviewTokenRequest{}
|
||||
mi := &file_api_proto_review_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ValidateReviewTokenRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ValidateReviewTokenRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ValidateReviewTokenRequest) 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 ValidateReviewTokenRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ValidateReviewTokenRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_review_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *ValidateReviewTokenRequest) GetToken() string {
|
||||
if x != nil {
|
||||
return x.Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ValidateReviewTokenResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
IsValid bool `protobuf:"varint,1,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"`
|
||||
ReviewerId string `protobuf:"bytes,2,opt,name=reviewer_id,json=reviewerId,proto3" json:"reviewer_id,omitempty"`
|
||||
CompetitionId string `protobuf:"bytes,3,opt,name=competition_id,json=competitionId,proto3" json:"competition_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ValidateReviewTokenResponse) Reset() {
|
||||
*x = ValidateReviewTokenResponse{}
|
||||
mi := &file_api_proto_review_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ValidateReviewTokenResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ValidateReviewTokenResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ValidateReviewTokenResponse) 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 ValidateReviewTokenResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ValidateReviewTokenResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_review_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *ValidateReviewTokenResponse) GetIsValid() bool {
|
||||
if x != nil {
|
||||
return x.IsValid
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *ValidateReviewTokenResponse) GetReviewerId() string {
|
||||
if x != nil {
|
||||
return x.ReviewerId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ValidateReviewTokenResponse) GetCompetitionId() string {
|
||||
if x != nil {
|
||||
return x.CompetitionId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
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"`
|
||||
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
||||
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
|
||||
PageToken int32 `protobuf:"varint,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
|
||||
Status *ReviewStatus `protobuf:"varint,4,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]
|
||||
mi := &file_api_proto_review_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -345,7 +450,7 @@ func (x *ListSubmissionsForReviewRequest) String() string {
|
||||
func (*ListSubmissionsForReviewRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListSubmissionsForReviewRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_proto_review_proto_msgTypes[3]
|
||||
mi := &file_api_proto_review_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -358,7 +463,14 @@ func (x *ListSubmissionsForReviewRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ListSubmissionsForReviewRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListSubmissionsForReviewRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_review_proto_rawDescGZIP(), []int{3}
|
||||
return file_api_proto_review_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *ListSubmissionsForReviewRequest) GetToken() string {
|
||||
if x != nil {
|
||||
return x.Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListSubmissionsForReviewRequest) GetPageSize() int32 {
|
||||
@@ -393,7 +505,7 @@ type ListSubmissionsForReviewResponse struct {
|
||||
|
||||
func (x *ListSubmissionsForReviewResponse) Reset() {
|
||||
*x = ListSubmissionsForReviewResponse{}
|
||||
mi := &file_api_proto_review_proto_msgTypes[4]
|
||||
mi := &file_api_proto_review_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -405,7 +517,7 @@ func (x *ListSubmissionsForReviewResponse) String() string {
|
||||
func (*ListSubmissionsForReviewResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListSubmissionsForReviewResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_proto_review_proto_msgTypes[4]
|
||||
mi := &file_api_proto_review_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -418,7 +530,7 @@ func (x *ListSubmissionsForReviewResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ListSubmissionsForReviewResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListSubmissionsForReviewResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_review_proto_rawDescGZIP(), []int{4}
|
||||
return file_api_proto_review_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *ListSubmissionsForReviewResponse) GetTotalCount() int32 {
|
||||
@@ -444,14 +556,15 @@ func (x *ListSubmissionsForReviewResponse) GetSubmissions() []*SubmissionSummary
|
||||
|
||||
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"`
|
||||
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
||||
SubmissionId string `protobuf:"bytes,2,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]
|
||||
mi := &file_api_proto_review_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -463,7 +576,7 @@ func (x *GetSubmissionForReviewRequest) String() string {
|
||||
func (*GetSubmissionForReviewRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetSubmissionForReviewRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_proto_review_proto_msgTypes[5]
|
||||
mi := &file_api_proto_review_proto_msgTypes[7]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -476,7 +589,14 @@ func (x *GetSubmissionForReviewRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetSubmissionForReviewRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetSubmissionForReviewRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_review_proto_rawDescGZIP(), []int{5}
|
||||
return file_api_proto_review_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *GetSubmissionForReviewRequest) GetToken() string {
|
||||
if x != nil {
|
||||
return x.Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetSubmissionForReviewRequest) GetSubmissionId() string {
|
||||
@@ -488,17 +608,18 @@ func (x *GetSubmissionForReviewRequest) GetSubmissionId() string {
|
||||
|
||||
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"`
|
||||
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
||||
SubmissionId string `protobuf:"bytes,2,opt,name=submission_id,json=submissionId,proto3" json:"submission_id,omitempty"`
|
||||
EarnedPoints int32 `protobuf:"varint,3,opt,name=earned_points,json=earnedPoints,proto3" json:"earned_points,omitempty"`
|
||||
ReviewerComment string `protobuf:"bytes,4,opt,name=reviewer_comment,json=reviewerComment,proto3" json:"reviewer_comment,omitempty"`
|
||||
Marks []*CriteriaMark `protobuf:"bytes,5,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]
|
||||
mi := &file_api_proto_review_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -510,7 +631,7 @@ func (x *EvaluateSubmissionRequest) String() string {
|
||||
func (*EvaluateSubmissionRequest) ProtoMessage() {}
|
||||
|
||||
func (x *EvaluateSubmissionRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_proto_review_proto_msgTypes[6]
|
||||
mi := &file_api_proto_review_proto_msgTypes[8]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -523,7 +644,14 @@ func (x *EvaluateSubmissionRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use EvaluateSubmissionRequest.ProtoReflect.Descriptor instead.
|
||||
func (*EvaluateSubmissionRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_review_proto_rawDescGZIP(), []int{6}
|
||||
return file_api_proto_review_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *EvaluateSubmissionRequest) GetToken() string {
|
||||
if x != nil {
|
||||
return x.Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EvaluateSubmissionRequest) GetSubmissionId() string {
|
||||
@@ -565,7 +693,7 @@ type EvaluateSubmissionResponse struct {
|
||||
|
||||
func (x *EvaluateSubmissionResponse) Reset() {
|
||||
*x = EvaluateSubmissionResponse{}
|
||||
mi := &file_api_proto_review_proto_msgTypes[7]
|
||||
mi := &file_api_proto_review_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -577,7 +705,7 @@ func (x *EvaluateSubmissionResponse) String() string {
|
||||
func (*EvaluateSubmissionResponse) ProtoMessage() {}
|
||||
|
||||
func (x *EvaluateSubmissionResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_proto_review_proto_msgTypes[7]
|
||||
mi := &file_api_proto_review_proto_msgTypes[9]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -590,7 +718,7 @@ func (x *EvaluateSubmissionResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use EvaluateSubmissionResponse.ProtoReflect.Descriptor instead.
|
||||
func (*EvaluateSubmissionResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_review_proto_rawDescGZIP(), []int{7}
|
||||
return file_api_proto_review_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *EvaluateSubmissionResponse) GetSubmissionId() string {
|
||||
@@ -616,14 +744,15 @@ func (x *EvaluateSubmissionResponse) GetNewStatus() ReviewStatus {
|
||||
|
||||
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"`
|
||||
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
||||
SubmissionId string `protobuf:"bytes,2,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]
|
||||
mi := &file_api_proto_review_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -635,7 +764,7 @@ func (x *ReleaseSubmissionRequest) String() string {
|
||||
func (*ReleaseSubmissionRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ReleaseSubmissionRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_proto_review_proto_msgTypes[8]
|
||||
mi := &file_api_proto_review_proto_msgTypes[10]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -648,7 +777,14 @@ func (x *ReleaseSubmissionRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ReleaseSubmissionRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ReleaseSubmissionRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_review_proto_rawDescGZIP(), []int{8}
|
||||
return file_api_proto_review_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *ReleaseSubmissionRequest) GetToken() string {
|
||||
if x != nil {
|
||||
return x.Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ReleaseSubmissionRequest) GetSubmissionId() string {
|
||||
@@ -685,40 +821,52 @@ const file_api_proto_review_proto_rawDesc = "" +
|
||||
"\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" +
|
||||
"\v_checked_at\"2\n" +
|
||||
"\x1aValidateReviewTokenRequest\x12\x14\n" +
|
||||
"\x05token\x18\x01 \x01(\tR\x05token\"\x80\x01\n" +
|
||||
"\x1bValidateReviewTokenResponse\x12\x19\n" +
|
||||
"\bis_valid\x18\x01 \x01(\bR\aisValid\x12\x1f\n" +
|
||||
"\vreviewer_id\x18\x02 \x01(\tR\n" +
|
||||
"reviewerId\x12%\n" +
|
||||
"\x0ecompetition_id\x18\x03 \x01(\tR\rcompetitionId\"\xb1\x01\n" +
|
||||
"\x1fListSubmissionsForReviewRequest\x12\x14\n" +
|
||||
"\x05token\x18\x01 \x01(\tR\x05token\x12\x1b\n" +
|
||||
"\tpage_size\x18\x02 \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" +
|
||||
"page_token\x18\x03 \x01(\x05R\tpageToken\x121\n" +
|
||||
"\x06status\x18\x04 \x01(\x0e2\x14.review.ReviewStatusH\x00R\x06status\x88\x01\x01B\t\n" +
|
||||
"\a_status\"\xa8\x01\n" +
|
||||
" ListSubmissionsForReviewResponse\x12\x1f\n" +
|
||||
"\vtotal_count\x18\x01 \x01(\x05R\n" +
|
||||
"totalCount\x12&\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" +
|
||||
"\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" +
|
||||
"\vsubmissions\x18\x03 \x03(\v2\x19.review.SubmissionSummaryR\vsubmissions\"Z\n" +
|
||||
"\x1dGetSubmissionForReviewRequest\x12\x14\n" +
|
||||
"\x05token\x18\x01 \x01(\tR\x05token\x12#\n" +
|
||||
"\rsubmission_id\x18\x02 \x01(\tR\fsubmissionId\"\xd2\x01\n" +
|
||||
"\x19EvaluateSubmissionRequest\x12\x14\n" +
|
||||
"\x05token\x18\x01 \x01(\tR\x05token\x12#\n" +
|
||||
"\rsubmission_id\x18\x02 \x01(\tR\fsubmissionId\x12#\n" +
|
||||
"\rearned_points\x18\x03 \x01(\x05R\fearnedPoints\x12)\n" +
|
||||
"\x10reviewer_comment\x18\x04 \x01(\tR\x0freviewerComment\x12*\n" +
|
||||
"\x05marks\x18\x05 \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" +
|
||||
"new_status\x18\x03 \x01(\x0e2\x14.review.ReviewStatusR\tnewStatus\"U\n" +
|
||||
"\x18ReleaseSubmissionRequest\x12\x14\n" +
|
||||
"\x05token\x18\x01 \x01(\tR\x05token\x12#\n" +
|
||||
"\rsubmission_id\x18\x02 \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" +
|
||||
"\x16REVIEW_STATUS_REJECTED\x10\x042\xe8\x03\n" +
|
||||
"\rReviewService\x12^\n" +
|
||||
"\x13ValidateReviewToken\x12\".review.ValidateReviewTokenRequest\x1a#.review.ValidateReviewTokenResponse\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" +
|
||||
@@ -737,41 +885,45 @@ func file_api_proto_review_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
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_msgTypes = make([]protoimpl.MessageInfo, 11)
|
||||
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
|
||||
(*ValidateReviewTokenRequest)(nil), // 4: review.ValidateReviewTokenRequest
|
||||
(*ValidateReviewTokenResponse)(nil), // 5: review.ValidateReviewTokenResponse
|
||||
(*ListSubmissionsForReviewRequest)(nil), // 6: review.ListSubmissionsForReviewRequest
|
||||
(*ListSubmissionsForReviewResponse)(nil), // 7: review.ListSubmissionsForReviewResponse
|
||||
(*GetSubmissionForReviewRequest)(nil), // 8: review.GetSubmissionForReviewRequest
|
||||
(*EvaluateSubmissionRequest)(nil), // 9: review.EvaluateSubmissionRequest
|
||||
(*EvaluateSubmissionResponse)(nil), // 10: review.EvaluateSubmissionResponse
|
||||
(*ReleaseSubmissionRequest)(nil), // 11: review.ReleaseSubmissionRequest
|
||||
(*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp
|
||||
(*emptypb.Empty)(nil), // 13: google.protobuf.Empty
|
||||
}
|
||||
var file_api_proto_review_proto_depIdxs = []int32{
|
||||
10, // 0: review.SubmissionSummary.submitted_at:type_name -> google.protobuf.Timestamp
|
||||
12, // 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
|
||||
12, // 3: review.SubmissionForReview.submitted_at:type_name -> google.protobuf.Timestamp
|
||||
12, // 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
|
||||
4, // 9: review.ReviewService.ValidateReviewToken:input_type -> review.ValidateReviewTokenRequest
|
||||
6, // 10: review.ReviewService.ListSubmissionsForReview:input_type -> review.ListSubmissionsForReviewRequest
|
||||
8, // 11: review.ReviewService.GetSubmissionForReview:input_type -> review.GetSubmissionForReviewRequest
|
||||
9, // 12: review.ReviewService.EvaluateSubmission:input_type -> review.EvaluateSubmissionRequest
|
||||
11, // 13: review.ReviewService.ReleaseSubmission:input_type -> review.ReleaseSubmissionRequest
|
||||
5, // 14: review.ReviewService.ValidateReviewToken:output_type -> review.ValidateReviewTokenResponse
|
||||
7, // 15: review.ReviewService.ListSubmissionsForReview:output_type -> review.ListSubmissionsForReviewResponse
|
||||
3, // 16: review.ReviewService.GetSubmissionForReview:output_type -> review.SubmissionForReview
|
||||
10, // 17: review.ReviewService.EvaluateSubmission:output_type -> review.EvaluateSubmissionResponse
|
||||
13, // 18: review.ReviewService.ReleaseSubmission:output_type -> google.protobuf.Empty
|
||||
14, // [14:19] is the sub-list for method output_type
|
||||
9, // [9:14] 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
|
||||
@@ -783,14 +935,14 @@ func file_api_proto_review_proto_init() {
|
||||
return
|
||||
}
|
||||
file_api_proto_review_proto_msgTypes[2].OneofWrappers = []any{}
|
||||
file_api_proto_review_proto_msgTypes[3].OneofWrappers = []any{}
|
||||
file_api_proto_review_proto_msgTypes[5].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,
|
||||
NumMessages: 11,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
@@ -20,6 +20,7 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
ReviewService_ValidateReviewToken_FullMethodName = "/review.ReviewService/ValidateReviewToken"
|
||||
ReviewService_ListSubmissionsForReview_FullMethodName = "/review.ReviewService/ListSubmissionsForReview"
|
||||
ReviewService_GetSubmissionForReview_FullMethodName = "/review.ReviewService/GetSubmissionForReview"
|
||||
ReviewService_EvaluateSubmission_FullMethodName = "/review.ReviewService/EvaluateSubmission"
|
||||
@@ -30,6 +31,7 @@ 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 ReviewServiceClient interface {
|
||||
ValidateReviewToken(ctx context.Context, in *ValidateReviewTokenRequest, opts ...grpc.CallOption) (*ValidateReviewTokenResponse, error)
|
||||
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)
|
||||
@@ -44,6 +46,16 @@ func NewReviewServiceClient(cc grpc.ClientConnInterface) ReviewServiceClient {
|
||||
return &reviewServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *reviewServiceClient) ValidateReviewToken(ctx context.Context, in *ValidateReviewTokenRequest, opts ...grpc.CallOption) (*ValidateReviewTokenResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ValidateReviewTokenResponse)
|
||||
err := c.cc.Invoke(ctx, ReviewService_ValidateReviewToken_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *reviewServiceClient) ListSubmissionsForReview(ctx context.Context, in *ListSubmissionsForReviewRequest, opts ...grpc.CallOption) (*ListSubmissionsForReviewResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListSubmissionsForReviewResponse)
|
||||
@@ -88,6 +100,7 @@ func (c *reviewServiceClient) ReleaseSubmission(ctx context.Context, in *Release
|
||||
// All implementations must embed UnimplementedReviewServiceServer
|
||||
// for forward compatibility.
|
||||
type ReviewServiceServer interface {
|
||||
ValidateReviewToken(context.Context, *ValidateReviewTokenRequest) (*ValidateReviewTokenResponse, error)
|
||||
ListSubmissionsForReview(context.Context, *ListSubmissionsForReviewRequest) (*ListSubmissionsForReviewResponse, error)
|
||||
GetSubmissionForReview(context.Context, *GetSubmissionForReviewRequest) (*SubmissionForReview, error)
|
||||
EvaluateSubmission(context.Context, *EvaluateSubmissionRequest) (*EvaluateSubmissionResponse, error)
|
||||
@@ -102,6 +115,9 @@ type ReviewServiceServer interface {
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedReviewServiceServer struct{}
|
||||
|
||||
func (UnimplementedReviewServiceServer) ValidateReviewToken(context.Context, *ValidateReviewTokenRequest) (*ValidateReviewTokenResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ValidateReviewToken not implemented")
|
||||
}
|
||||
func (UnimplementedReviewServiceServer) ListSubmissionsForReview(context.Context, *ListSubmissionsForReviewRequest) (*ListSubmissionsForReviewResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListSubmissionsForReview not implemented")
|
||||
}
|
||||
@@ -135,6 +151,24 @@ func RegisterReviewServiceServer(s grpc.ServiceRegistrar, srv ReviewServiceServe
|
||||
s.RegisterService(&ReviewService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _ReviewService_ValidateReviewToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ValidateReviewTokenRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ReviewServiceServer).ValidateReviewToken(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ReviewService_ValidateReviewToken_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ReviewServiceServer).ValidateReviewToken(ctx, req.(*ValidateReviewTokenRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
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 {
|
||||
@@ -214,6 +248,10 @@ var ReviewService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "review.ReviewService",
|
||||
HandlerType: (*ReviewServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ValidateReviewToken",
|
||||
Handler: _ReviewService_ValidateReviewToken_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListSubmissionsForReview",
|
||||
Handler: _ReviewService_ListSubmissionsForReview_Handler,
|
||||
|
||||
@@ -190,9 +190,10 @@ func (x *Submission) GetFileUrl() string {
|
||||
|
||||
type SubmitTaskRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
CompetitionId string `protobuf:"bytes,1,opt,name=competition_id,json=competitionId,proto3" json:"competition_id,omitempty"`
|
||||
TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
|
||||
FileUrl string `protobuf:"bytes,3,opt,name=file_url,json=fileUrl,proto3" json:"file_url,omitempty"`
|
||||
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_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"`
|
||||
FileUrl string `protobuf:"bytes,4,opt,name=file_url,json=fileUrl,proto3" json:"file_url,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -227,6 +228,13 @@ func (*SubmitTaskRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_submission_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *SubmitTaskRequest) GetUserId() string {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SubmitTaskRequest) GetCompetitionId() string {
|
||||
if x != nil {
|
||||
return x.CompetitionId
|
||||
@@ -250,8 +258,9 @@ func (x *SubmitTaskRequest) GetFileUrl() string {
|
||||
|
||||
type GetSubmissionsHistoryRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
CompetitionId string `protobuf:"bytes,1,opt,name=competition_id,json=competitionId,proto3" json:"competition_id,omitempty"`
|
||||
TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
|
||||
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_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"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -286,6 +295,13 @@ func (*GetSubmissionsHistoryRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_proto_submission_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *GetSubmissionsHistoryRequest) GetUserId() string {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetSubmissionsHistoryRequest) GetCompetitionId() string {
|
||||
if x != nil {
|
||||
return x.CompetitionId
|
||||
@@ -549,14 +565,16 @@ const file_api_proto_submission_proto_rawDesc = "" +
|
||||
"\fsubmitted_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\vsubmittedAt\x129\n" +
|
||||
"\n" +
|
||||
"checked_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\tcheckedAt\x12\x19\n" +
|
||||
"\bfile_url\x18\t \x01(\tR\afileUrl\"n\n" +
|
||||
"\x11SubmitTaskRequest\x12%\n" +
|
||||
"\x0ecompetition_id\x18\x01 \x01(\tR\rcompetitionId\x12\x17\n" +
|
||||
"\atask_id\x18\x02 \x01(\tR\x06taskId\x12\x19\n" +
|
||||
"\bfile_url\x18\x03 \x01(\tR\afileUrl\"^\n" +
|
||||
"\x1cGetSubmissionsHistoryRequest\x12%\n" +
|
||||
"\x0ecompetition_id\x18\x01 \x01(\tR\rcompetitionId\x12\x17\n" +
|
||||
"\atask_id\x18\x02 \x01(\tR\x06taskId\"Y\n" +
|
||||
"\bfile_url\x18\t \x01(\tR\afileUrl\"\x87\x01\n" +
|
||||
"\x11SubmitTaskRequest\x12\x17\n" +
|
||||
"\auser_id\x18\x01 \x01(\tR\x06userId\x12%\n" +
|
||||
"\x0ecompetition_id\x18\x02 \x01(\tR\rcompetitionId\x12\x17\n" +
|
||||
"\atask_id\x18\x03 \x01(\tR\x06taskId\x12\x19\n" +
|
||||
"\bfile_url\x18\x04 \x01(\tR\afileUrl\"w\n" +
|
||||
"\x1cGetSubmissionsHistoryRequest\x12\x17\n" +
|
||||
"\auser_id\x18\x01 \x01(\tR\x06userId\x12%\n" +
|
||||
"\x0ecompetition_id\x18\x02 \x01(\tR\rcompetitionId\x12\x17\n" +
|
||||
"\atask_id\x18\x03 \x01(\tR\x06taskId\"Y\n" +
|
||||
"\x1dGetSubmissionsHistoryResponse\x128\n" +
|
||||
"\vsubmissions\x18\x01 \x03(\v2\x16.submission.SubmissionR\vsubmissions\";\n" +
|
||||
"\x14GetSubmissionRequest\x12#\n" +
|
||||
|
||||
Reference in New Issue
Block a user