416 lines
13 KiB
Go
416 lines
13 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.11
|
|
// protoc v6.33.2
|
|
// source: api/proto/user.proto
|
|
|
|
package user
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
|
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 User struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
|
|
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
|
|
FullName *string `protobuf:"bytes,4,opt,name=full_name,json=fullName,proto3,oneof" json:"full_name,omitempty"`
|
|
AvatarUrl *string `protobuf:"bytes,5,opt,name=avatar_url,json=avatarUrl,proto3,oneof" json:"avatar_url,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *User) Reset() {
|
|
*x = User{}
|
|
mi := &file_api_proto_user_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *User) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*User) ProtoMessage() {}
|
|
|
|
func (x *User) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_proto_user_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 User.ProtoReflect.Descriptor instead.
|
|
func (*User) Descriptor() ([]byte, []int) {
|
|
return file_api_proto_user_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *User) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetUsername() string {
|
|
if x != nil {
|
|
return x.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetEmail() string {
|
|
if x != nil {
|
|
return x.Email
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetFullName() string {
|
|
if x != nil && x.FullName != nil {
|
|
return *x.FullName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetAvatarUrl() string {
|
|
if x != nil && x.AvatarUrl != nil {
|
|
return *x.AvatarUrl
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetProfileRequest 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 *GetProfileRequest) Reset() {
|
|
*x = GetProfileRequest{}
|
|
mi := &file_api_proto_user_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetProfileRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetProfileRequest) ProtoMessage() {}
|
|
|
|
func (x *GetProfileRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_proto_user_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 GetProfileRequest.ProtoReflect.Descriptor instead.
|
|
func (*GetProfileRequest) Descriptor() ([]byte, []int) {
|
|
return file_api_proto_user_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *GetProfileRequest) GetUserId() string {
|
|
if x != nil {
|
|
return x.UserId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type RegisterForCompetitionRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
CompetitionId string `protobuf:"bytes,1,opt,name=competition_id,json=competitionId,proto3" json:"competition_id,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *RegisterForCompetitionRequest) Reset() {
|
|
*x = RegisterForCompetitionRequest{}
|
|
mi := &file_api_proto_user_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *RegisterForCompetitionRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*RegisterForCompetitionRequest) ProtoMessage() {}
|
|
|
|
func (x *RegisterForCompetitionRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_proto_user_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 RegisterForCompetitionRequest.ProtoReflect.Descriptor instead.
|
|
func (*RegisterForCompetitionRequest) Descriptor() ([]byte, []int) {
|
|
return file_api_proto_user_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *RegisterForCompetitionRequest) GetCompetitionId() string {
|
|
if x != nil {
|
|
return x.CompetitionId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type UnregisterFromCompetitionRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
CompetitionId string `protobuf:"bytes,1,opt,name=competition_id,json=competitionId,proto3" json:"competition_id,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *UnregisterFromCompetitionRequest) Reset() {
|
|
*x = UnregisterFromCompetitionRequest{}
|
|
mi := &file_api_proto_user_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *UnregisterFromCompetitionRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*UnregisterFromCompetitionRequest) ProtoMessage() {}
|
|
|
|
func (x *UnregisterFromCompetitionRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_proto_user_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 UnregisterFromCompetitionRequest.ProtoReflect.Descriptor instead.
|
|
func (*UnregisterFromCompetitionRequest) Descriptor() ([]byte, []int) {
|
|
return file_api_proto_user_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *UnregisterFromCompetitionRequest) GetCompetitionId() string {
|
|
if x != nil {
|
|
return x.CompetitionId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListUserCompetitionsRequest 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 *ListUserCompetitionsRequest) Reset() {
|
|
*x = ListUserCompetitionsRequest{}
|
|
mi := &file_api_proto_user_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ListUserCompetitionsRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ListUserCompetitionsRequest) ProtoMessage() {}
|
|
|
|
func (x *ListUserCompetitionsRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_proto_user_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 ListUserCompetitionsRequest.ProtoReflect.Descriptor instead.
|
|
func (*ListUserCompetitionsRequest) Descriptor() ([]byte, []int) {
|
|
return file_api_proto_user_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *ListUserCompetitionsRequest) GetUserId() string {
|
|
if x != nil {
|
|
return x.UserId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListUserCompetitionsResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
CompetitionIds []string `protobuf:"bytes,1,rep,name=competition_ids,json=competitionIds,proto3" json:"competition_ids,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ListUserCompetitionsResponse) Reset() {
|
|
*x = ListUserCompetitionsResponse{}
|
|
mi := &file_api_proto_user_proto_msgTypes[5]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ListUserCompetitionsResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ListUserCompetitionsResponse) ProtoMessage() {}
|
|
|
|
func (x *ListUserCompetitionsResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_proto_user_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 ListUserCompetitionsResponse.ProtoReflect.Descriptor instead.
|
|
func (*ListUserCompetitionsResponse) Descriptor() ([]byte, []int) {
|
|
return file_api_proto_user_proto_rawDescGZIP(), []int{5}
|
|
}
|
|
|
|
func (x *ListUserCompetitionsResponse) GetCompetitionIds() []string {
|
|
if x != nil {
|
|
return x.CompetitionIds
|
|
}
|
|
return nil
|
|
}
|
|
|
|
var File_api_proto_user_proto protoreflect.FileDescriptor
|
|
|
|
const file_api_proto_user_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\x14api/proto/user.proto\x12\x04user\x1a\x1bgoogle/protobuf/empty.proto\"\xab\x01\n" +
|
|
"\x04User\x12\x0e\n" +
|
|
"\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n" +
|
|
"\busername\x18\x02 \x01(\tR\busername\x12\x14\n" +
|
|
"\x05email\x18\x03 \x01(\tR\x05email\x12 \n" +
|
|
"\tfull_name\x18\x04 \x01(\tH\x00R\bfullName\x88\x01\x01\x12\"\n" +
|
|
"\n" +
|
|
"avatar_url\x18\x05 \x01(\tH\x01R\tavatarUrl\x88\x01\x01B\f\n" +
|
|
"\n" +
|
|
"_full_nameB\r\n" +
|
|
"\v_avatar_url\",\n" +
|
|
"\x11GetProfileRequest\x12\x17\n" +
|
|
"\auser_id\x18\x01 \x01(\tR\x06userId\"F\n" +
|
|
"\x1dRegisterForCompetitionRequest\x12%\n" +
|
|
"\x0ecompetition_id\x18\x01 \x01(\tR\rcompetitionId\"I\n" +
|
|
" UnregisterFromCompetitionRequest\x12%\n" +
|
|
"\x0ecompetition_id\x18\x01 \x01(\tR\rcompetitionId\"6\n" +
|
|
"\x1bListUserCompetitionsRequest\x12\x17\n" +
|
|
"\auser_id\x18\x01 \x01(\tR\x06userId\"G\n" +
|
|
"\x1cListUserCompetitionsResponse\x12'\n" +
|
|
"\x0fcompetition_ids\x18\x01 \x03(\tR\x0ecompetitionIds2\xd3\x02\n" +
|
|
"\vUserService\x121\n" +
|
|
"\n" +
|
|
"GetProfile\x12\x17.user.GetProfileRequest\x1a\n" +
|
|
".user.User\x12U\n" +
|
|
"\x16RegisterForCompetition\x12#.user.RegisterForCompetitionRequest\x1a\x16.google.protobuf.Empty\x12[\n" +
|
|
"\x19UnregisterFromCompetition\x12&.user.UnregisterFromCompetitionRequest\x1a\x16.google.protobuf.Empty\x12]\n" +
|
|
"\x14ListUserCompetitions\x12!.user.ListUserCompetitionsRequest\x1a\".user.ListUserCompetitionsResponseB\x0eZ\fpkg/api/userb\x06proto3"
|
|
|
|
var (
|
|
file_api_proto_user_proto_rawDescOnce sync.Once
|
|
file_api_proto_user_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_api_proto_user_proto_rawDescGZIP() []byte {
|
|
file_api_proto_user_proto_rawDescOnce.Do(func() {
|
|
file_api_proto_user_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_api_proto_user_proto_rawDesc), len(file_api_proto_user_proto_rawDesc)))
|
|
})
|
|
return file_api_proto_user_proto_rawDescData
|
|
}
|
|
|
|
var file_api_proto_user_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
|
var file_api_proto_user_proto_goTypes = []any{
|
|
(*User)(nil), // 0: user.User
|
|
(*GetProfileRequest)(nil), // 1: user.GetProfileRequest
|
|
(*RegisterForCompetitionRequest)(nil), // 2: user.RegisterForCompetitionRequest
|
|
(*UnregisterFromCompetitionRequest)(nil), // 3: user.UnregisterFromCompetitionRequest
|
|
(*ListUserCompetitionsRequest)(nil), // 4: user.ListUserCompetitionsRequest
|
|
(*ListUserCompetitionsResponse)(nil), // 5: user.ListUserCompetitionsResponse
|
|
(*emptypb.Empty)(nil), // 6: google.protobuf.Empty
|
|
}
|
|
var file_api_proto_user_proto_depIdxs = []int32{
|
|
1, // 0: user.UserService.GetProfile:input_type -> user.GetProfileRequest
|
|
2, // 1: user.UserService.RegisterForCompetition:input_type -> user.RegisterForCompetitionRequest
|
|
3, // 2: user.UserService.UnregisterFromCompetition:input_type -> user.UnregisterFromCompetitionRequest
|
|
4, // 3: user.UserService.ListUserCompetitions:input_type -> user.ListUserCompetitionsRequest
|
|
0, // 4: user.UserService.GetProfile:output_type -> user.User
|
|
6, // 5: user.UserService.RegisterForCompetition:output_type -> google.protobuf.Empty
|
|
6, // 6: user.UserService.UnregisterFromCompetition:output_type -> google.protobuf.Empty
|
|
5, // 7: user.UserService.ListUserCompetitions:output_type -> user.ListUserCompetitionsResponse
|
|
4, // [4:8] is the sub-list for method output_type
|
|
0, // [0:4] is the sub-list for method input_type
|
|
0, // [0:0] is the sub-list for extension type_name
|
|
0, // [0:0] is the sub-list for extension extendee
|
|
0, // [0:0] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_api_proto_user_proto_init() }
|
|
func file_api_proto_user_proto_init() {
|
|
if File_api_proto_user_proto != nil {
|
|
return
|
|
}
|
|
file_api_proto_user_proto_msgTypes[0].OneofWrappers = []any{}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_api_proto_user_proto_rawDesc), len(file_api_proto_user_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 6,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_api_proto_user_proto_goTypes,
|
|
DependencyIndexes: file_api_proto_user_proto_depIdxs,
|
|
MessageInfos: file_api_proto_user_proto_msgTypes,
|
|
}.Build()
|
|
File_api_proto_user_proto = out.File
|
|
file_api_proto_user_proto_goTypes = nil
|
|
file_api_proto_user_proto_depIdxs = nil
|
|
}
|