895 lines
26 KiB
Go
895 lines
26 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.10
|
|
// protoc v6.33.2
|
|
// source: api/proto/auth.proto
|
|
|
|
package auth
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
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 SignUpRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
|
|
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
|
|
Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *SignUpRequest) Reset() {
|
|
*x = SignUpRequest{}
|
|
mi := &file_api_proto_auth_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SignUpRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SignUpRequest) ProtoMessage() {}
|
|
|
|
func (x *SignUpRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_proto_auth_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 SignUpRequest.ProtoReflect.Descriptor instead.
|
|
func (*SignUpRequest) Descriptor() ([]byte, []int) {
|
|
return file_api_proto_auth_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *SignUpRequest) GetEmail() string {
|
|
if x != nil {
|
|
return x.Email
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *SignUpRequest) GetUsername() string {
|
|
if x != nil {
|
|
return x.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *SignUpRequest) GetPassword() string {
|
|
if x != nil {
|
|
return x.Password
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type SignUpResponse 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 *SignUpResponse) Reset() {
|
|
*x = SignUpResponse{}
|
|
mi := &file_api_proto_auth_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SignUpResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SignUpResponse) ProtoMessage() {}
|
|
|
|
func (x *SignUpResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_proto_auth_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 SignUpResponse.ProtoReflect.Descriptor instead.
|
|
func (*SignUpResponse) Descriptor() ([]byte, []int) {
|
|
return file_api_proto_auth_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *SignUpResponse) GetToken() string {
|
|
if x != nil {
|
|
return x.Token
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type SignInRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
|
|
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *SignInRequest) Reset() {
|
|
*x = SignInRequest{}
|
|
mi := &file_api_proto_auth_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SignInRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SignInRequest) ProtoMessage() {}
|
|
|
|
func (x *SignInRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_proto_auth_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 SignInRequest.ProtoReflect.Descriptor instead.
|
|
func (*SignInRequest) Descriptor() ([]byte, []int) {
|
|
return file_api_proto_auth_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *SignInRequest) GetEmail() string {
|
|
if x != nil {
|
|
return x.Email
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *SignInRequest) GetPassword() string {
|
|
if x != nil {
|
|
return x.Password
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type SignInResponse 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 *SignInResponse) Reset() {
|
|
*x = SignInResponse{}
|
|
mi := &file_api_proto_auth_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SignInResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SignInResponse) ProtoMessage() {}
|
|
|
|
func (x *SignInResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_proto_auth_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 SignInResponse.ProtoReflect.Descriptor instead.
|
|
func (*SignInResponse) Descriptor() ([]byte, []int) {
|
|
return file_api_proto_auth_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *SignInResponse) GetToken() string {
|
|
if x != nil {
|
|
return x.Token
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetMeRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetMeRequest) Reset() {
|
|
*x = GetMeRequest{}
|
|
mi := &file_api_proto_auth_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetMeRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetMeRequest) ProtoMessage() {}
|
|
|
|
func (x *GetMeRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_proto_auth_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 GetMeRequest.ProtoReflect.Descriptor instead.
|
|
func (*GetMeRequest) Descriptor() ([]byte, []int) {
|
|
return file_api_proto_auth_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
type GetMeResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetMeResponse) Reset() {
|
|
*x = GetMeResponse{}
|
|
mi := &file_api_proto_auth_proto_msgTypes[5]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetMeResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetMeResponse) ProtoMessage() {}
|
|
|
|
func (x *GetMeResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_proto_auth_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 GetMeResponse.ProtoReflect.Descriptor instead.
|
|
func (*GetMeResponse) Descriptor() ([]byte, []int) {
|
|
return file_api_proto_auth_proto_rawDescGZIP(), []int{5}
|
|
}
|
|
|
|
func (x *GetMeResponse) GetUser() *User {
|
|
if x != nil {
|
|
return x.User
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type GetUserRequest 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 *GetUserRequest) Reset() {
|
|
*x = GetUserRequest{}
|
|
mi := &file_api_proto_auth_proto_msgTypes[6]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetUserRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetUserRequest) ProtoMessage() {}
|
|
|
|
func (x *GetUserRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_proto_auth_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 GetUserRequest.ProtoReflect.Descriptor instead.
|
|
func (*GetUserRequest) Descriptor() ([]byte, []int) {
|
|
return file_api_proto_auth_proto_rawDescGZIP(), []int{6}
|
|
}
|
|
|
|
func (x *GetUserRequest) GetUserId() string {
|
|
if x != nil {
|
|
return x.UserId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetUserResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetUserResponse) Reset() {
|
|
*x = GetUserResponse{}
|
|
mi := &file_api_proto_auth_proto_msgTypes[7]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetUserResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetUserResponse) ProtoMessage() {}
|
|
|
|
func (x *GetUserResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_proto_auth_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 GetUserResponse.ProtoReflect.Descriptor instead.
|
|
func (*GetUserResponse) Descriptor() ([]byte, []int) {
|
|
return file_api_proto_auth_proto_rawDescGZIP(), []int{7}
|
|
}
|
|
|
|
func (x *GetUserResponse) GetUser() *User {
|
|
if x != nil {
|
|
return x.User
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type GetMyStatRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetMyStatRequest) Reset() {
|
|
*x = GetMyStatRequest{}
|
|
mi := &file_api_proto_auth_proto_msgTypes[8]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetMyStatRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetMyStatRequest) ProtoMessage() {}
|
|
|
|
func (x *GetMyStatRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_proto_auth_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 GetMyStatRequest.ProtoReflect.Descriptor instead.
|
|
func (*GetMyStatRequest) Descriptor() ([]byte, []int) {
|
|
return file_api_proto_auth_proto_rawDescGZIP(), []int{8}
|
|
}
|
|
|
|
type GetMyStatResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Stat *Stat `protobuf:"bytes,1,opt,name=stat,proto3" json:"stat,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetMyStatResponse) Reset() {
|
|
*x = GetMyStatResponse{}
|
|
mi := &file_api_proto_auth_proto_msgTypes[9]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetMyStatResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetMyStatResponse) ProtoMessage() {}
|
|
|
|
func (x *GetMyStatResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_proto_auth_proto_msgTypes[9]
|
|
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 GetMyStatResponse.ProtoReflect.Descriptor instead.
|
|
func (*GetMyStatResponse) Descriptor() ([]byte, []int) {
|
|
return file_api_proto_auth_proto_rawDescGZIP(), []int{9}
|
|
}
|
|
|
|
func (x *GetMyStatResponse) GetStat() *Stat {
|
|
if x != nil {
|
|
return x.Stat
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type GetLeaderboardRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetLeaderboardRequest) Reset() {
|
|
*x = GetLeaderboardRequest{}
|
|
mi := &file_api_proto_auth_proto_msgTypes[10]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetLeaderboardRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetLeaderboardRequest) ProtoMessage() {}
|
|
|
|
func (x *GetLeaderboardRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_proto_auth_proto_msgTypes[10]
|
|
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 GetLeaderboardRequest.ProtoReflect.Descriptor instead.
|
|
func (*GetLeaderboardRequest) Descriptor() ([]byte, []int) {
|
|
return file_api_proto_auth_proto_rawDescGZIP(), []int{10}
|
|
}
|
|
|
|
type GetLeaderboardResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetLeaderboardResponse) Reset() {
|
|
*x = GetLeaderboardResponse{}
|
|
mi := &file_api_proto_auth_proto_msgTypes[11]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetLeaderboardResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetLeaderboardResponse) ProtoMessage() {}
|
|
|
|
func (x *GetLeaderboardResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_proto_auth_proto_msgTypes[11]
|
|
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 GetLeaderboardResponse.ProtoReflect.Descriptor instead.
|
|
func (*GetLeaderboardResponse) Descriptor() ([]byte, []int) {
|
|
return file_api_proto_auth_proto_rawDescGZIP(), []int{11}
|
|
}
|
|
|
|
func (x *GetLeaderboardResponse) GetUsers() []*User {
|
|
if x != nil {
|
|
return x.Users
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type User struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Id *string `protobuf:"bytes,1,opt,name=id,proto3,oneof" json:"id,omitempty"`
|
|
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
|
|
Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
|
|
Avatar *string `protobuf:"bytes,4,opt,name=avatar,proto3,oneof" json:"avatar,omitempty"`
|
|
CreatedAt string `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
|
|
Achievements []*UserAchievement `protobuf:"bytes,6,rep,name=achievements,proto3" json:"achievements,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *User) Reset() {
|
|
*x = User{}
|
|
mi := &file_api_proto_auth_proto_msgTypes[12]
|
|
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_auth_proto_msgTypes[12]
|
|
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_auth_proto_rawDescGZIP(), []int{12}
|
|
}
|
|
|
|
func (x *User) GetId() string {
|
|
if x != nil && x.Id != nil {
|
|
return *x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetEmail() string {
|
|
if x != nil {
|
|
return x.Email
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetUsername() string {
|
|
if x != nil {
|
|
return x.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetAvatar() string {
|
|
if x != nil && x.Avatar != nil {
|
|
return *x.Avatar
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetCreatedAt() string {
|
|
if x != nil {
|
|
return x.CreatedAt
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetAchievements() []*UserAchievement {
|
|
if x != nil {
|
|
return x.Achievements
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type UserAchievement struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
|
|
Icon string `protobuf:"bytes,3,opt,name=icon,proto3" json:"icon,omitempty"`
|
|
ReceivedAt string `protobuf:"bytes,4,opt,name=received_at,json=receivedAt,proto3" json:"received_at,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *UserAchievement) Reset() {
|
|
*x = UserAchievement{}
|
|
mi := &file_api_proto_auth_proto_msgTypes[13]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *UserAchievement) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*UserAchievement) ProtoMessage() {}
|
|
|
|
func (x *UserAchievement) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_proto_auth_proto_msgTypes[13]
|
|
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 UserAchievement.ProtoReflect.Descriptor instead.
|
|
func (*UserAchievement) Descriptor() ([]byte, []int) {
|
|
return file_api_proto_auth_proto_rawDescGZIP(), []int{13}
|
|
}
|
|
|
|
func (x *UserAchievement) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UserAchievement) GetDescription() string {
|
|
if x != nil {
|
|
return x.Description
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UserAchievement) GetIcon() string {
|
|
if x != nil {
|
|
return x.Icon
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UserAchievement) GetReceivedAt() string {
|
|
if x != nil {
|
|
return x.ReceivedAt
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type Stat struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
TotalAttempts int32 `protobuf:"varint,1,opt,name=total_attempts,json=totalAttempts,proto3" json:"total_attempts,omitempty"`
|
|
SolvedTasks int32 `protobuf:"varint,2,opt,name=solved_tasks,json=solvedTasks,proto3" json:"solved_tasks,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *Stat) Reset() {
|
|
*x = Stat{}
|
|
mi := &file_api_proto_auth_proto_msgTypes[14]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *Stat) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Stat) ProtoMessage() {}
|
|
|
|
func (x *Stat) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_proto_auth_proto_msgTypes[14]
|
|
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 Stat.ProtoReflect.Descriptor instead.
|
|
func (*Stat) Descriptor() ([]byte, []int) {
|
|
return file_api_proto_auth_proto_rawDescGZIP(), []int{14}
|
|
}
|
|
|
|
func (x *Stat) GetTotalAttempts() int32 {
|
|
if x != nil {
|
|
return x.TotalAttempts
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Stat) GetSolvedTasks() int32 {
|
|
if x != nil {
|
|
return x.SolvedTasks
|
|
}
|
|
return 0
|
|
}
|
|
|
|
var File_api_proto_auth_proto protoreflect.FileDescriptor
|
|
|
|
const file_api_proto_auth_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\x14api/proto/auth.proto\x12\x04auth\"]\n" +
|
|
"\rSignUpRequest\x12\x14\n" +
|
|
"\x05email\x18\x01 \x01(\tR\x05email\x12\x1a\n" +
|
|
"\busername\x18\x02 \x01(\tR\busername\x12\x1a\n" +
|
|
"\bpassword\x18\x03 \x01(\tR\bpassword\"&\n" +
|
|
"\x0eSignUpResponse\x12\x14\n" +
|
|
"\x05token\x18\x01 \x01(\tR\x05token\"A\n" +
|
|
"\rSignInRequest\x12\x14\n" +
|
|
"\x05email\x18\x01 \x01(\tR\x05email\x12\x1a\n" +
|
|
"\bpassword\x18\x02 \x01(\tR\bpassword\"&\n" +
|
|
"\x0eSignInResponse\x12\x14\n" +
|
|
"\x05token\x18\x01 \x01(\tR\x05token\"\x0e\n" +
|
|
"\fGetMeRequest\"/\n" +
|
|
"\rGetMeResponse\x12\x1e\n" +
|
|
"\x04user\x18\x01 \x01(\v2\n" +
|
|
".auth.UserR\x04user\")\n" +
|
|
"\x0eGetUserRequest\x12\x17\n" +
|
|
"\auser_id\x18\x01 \x01(\tR\x06userId\"1\n" +
|
|
"\x0fGetUserResponse\x12\x1e\n" +
|
|
"\x04user\x18\x01 \x01(\v2\n" +
|
|
".auth.UserR\x04user\"\x12\n" +
|
|
"\x10GetMyStatRequest\"3\n" +
|
|
"\x11GetMyStatResponse\x12\x1e\n" +
|
|
"\x04stat\x18\x01 \x01(\v2\n" +
|
|
".auth.StatR\x04stat\"\x17\n" +
|
|
"\x15GetLeaderboardRequest\":\n" +
|
|
"\x16GetLeaderboardResponse\x12 \n" +
|
|
"\x05users\x18\x01 \x03(\v2\n" +
|
|
".auth.UserR\x05users\"\xd6\x01\n" +
|
|
"\x04User\x12\x13\n" +
|
|
"\x02id\x18\x01 \x01(\tH\x00R\x02id\x88\x01\x01\x12\x14\n" +
|
|
"\x05email\x18\x02 \x01(\tR\x05email\x12\x1a\n" +
|
|
"\busername\x18\x03 \x01(\tR\busername\x12\x1b\n" +
|
|
"\x06avatar\x18\x04 \x01(\tH\x01R\x06avatar\x88\x01\x01\x12\x1d\n" +
|
|
"\n" +
|
|
"created_at\x18\x05 \x01(\tR\tcreatedAt\x129\n" +
|
|
"\fachievements\x18\x06 \x03(\v2\x15.auth.UserAchievementR\fachievementsB\x05\n" +
|
|
"\x03_idB\t\n" +
|
|
"\a_avatar\"|\n" +
|
|
"\x0fUserAchievement\x12\x12\n" +
|
|
"\x04name\x18\x01 \x01(\tR\x04name\x12 \n" +
|
|
"\vdescription\x18\x02 \x01(\tR\vdescription\x12\x12\n" +
|
|
"\x04icon\x18\x03 \x01(\tR\x04icon\x12\x1f\n" +
|
|
"\vreceived_at\x18\x04 \x01(\tR\n" +
|
|
"receivedAt\"P\n" +
|
|
"\x04Stat\x12%\n" +
|
|
"\x0etotal_attempts\x18\x01 \x01(\x05R\rtotalAttempts\x12!\n" +
|
|
"\fsolved_tasks\x18\x02 \x01(\x05R\vsolvedTasks2\xec\x02\n" +
|
|
"\vAuthService\x123\n" +
|
|
"\x06SignUp\x12\x13.auth.SignUpRequest\x1a\x14.auth.SignUpResponse\x123\n" +
|
|
"\x06SignIn\x12\x13.auth.SignInRequest\x1a\x14.auth.SignInResponse\x120\n" +
|
|
"\x05GetMe\x12\x12.auth.GetMeRequest\x1a\x13.auth.GetMeResponse\x126\n" +
|
|
"\aGetUser\x12\x14.auth.GetUserRequest\x1a\x15.auth.GetUserResponse\x12<\n" +
|
|
"\tGetMyStat\x12\x16.auth.GetMyStatRequest\x1a\x17.auth.GetMyStatResponse\x12K\n" +
|
|
"\x0eGetLeaderboard\x12\x1b.auth.GetLeaderboardRequest\x1a\x1c.auth.GetLeaderboardResponseB\x0eZ\fpkg/api/authb\x06proto3"
|
|
|
|
var (
|
|
file_api_proto_auth_proto_rawDescOnce sync.Once
|
|
file_api_proto_auth_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_api_proto_auth_proto_rawDescGZIP() []byte {
|
|
file_api_proto_auth_proto_rawDescOnce.Do(func() {
|
|
file_api_proto_auth_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_api_proto_auth_proto_rawDesc), len(file_api_proto_auth_proto_rawDesc)))
|
|
})
|
|
return file_api_proto_auth_proto_rawDescData
|
|
}
|
|
|
|
var file_api_proto_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
|
|
var file_api_proto_auth_proto_goTypes = []any{
|
|
(*SignUpRequest)(nil), // 0: auth.SignUpRequest
|
|
(*SignUpResponse)(nil), // 1: auth.SignUpResponse
|
|
(*SignInRequest)(nil), // 2: auth.SignInRequest
|
|
(*SignInResponse)(nil), // 3: auth.SignInResponse
|
|
(*GetMeRequest)(nil), // 4: auth.GetMeRequest
|
|
(*GetMeResponse)(nil), // 5: auth.GetMeResponse
|
|
(*GetUserRequest)(nil), // 6: auth.GetUserRequest
|
|
(*GetUserResponse)(nil), // 7: auth.GetUserResponse
|
|
(*GetMyStatRequest)(nil), // 8: auth.GetMyStatRequest
|
|
(*GetMyStatResponse)(nil), // 9: auth.GetMyStatResponse
|
|
(*GetLeaderboardRequest)(nil), // 10: auth.GetLeaderboardRequest
|
|
(*GetLeaderboardResponse)(nil), // 11: auth.GetLeaderboardResponse
|
|
(*User)(nil), // 12: auth.User
|
|
(*UserAchievement)(nil), // 13: auth.UserAchievement
|
|
(*Stat)(nil), // 14: auth.Stat
|
|
}
|
|
var file_api_proto_auth_proto_depIdxs = []int32{
|
|
12, // 0: auth.GetMeResponse.user:type_name -> auth.User
|
|
12, // 1: auth.GetUserResponse.user:type_name -> auth.User
|
|
14, // 2: auth.GetMyStatResponse.stat:type_name -> auth.Stat
|
|
12, // 3: auth.GetLeaderboardResponse.users:type_name -> auth.User
|
|
13, // 4: auth.User.achievements:type_name -> auth.UserAchievement
|
|
0, // 5: auth.AuthService.SignUp:input_type -> auth.SignUpRequest
|
|
2, // 6: auth.AuthService.SignIn:input_type -> auth.SignInRequest
|
|
4, // 7: auth.AuthService.GetMe:input_type -> auth.GetMeRequest
|
|
6, // 8: auth.AuthService.GetUser:input_type -> auth.GetUserRequest
|
|
8, // 9: auth.AuthService.GetMyStat:input_type -> auth.GetMyStatRequest
|
|
10, // 10: auth.AuthService.GetLeaderboard:input_type -> auth.GetLeaderboardRequest
|
|
1, // 11: auth.AuthService.SignUp:output_type -> auth.SignUpResponse
|
|
3, // 12: auth.AuthService.SignIn:output_type -> auth.SignInResponse
|
|
5, // 13: auth.AuthService.GetMe:output_type -> auth.GetMeResponse
|
|
7, // 14: auth.AuthService.GetUser:output_type -> auth.GetUserResponse
|
|
9, // 15: auth.AuthService.GetMyStat:output_type -> auth.GetMyStatResponse
|
|
11, // 16: auth.AuthService.GetLeaderboard:output_type -> auth.GetLeaderboardResponse
|
|
11, // [11:17] is the sub-list for method output_type
|
|
5, // [5:11] is the sub-list for method input_type
|
|
5, // [5:5] is the sub-list for extension type_name
|
|
5, // [5:5] is the sub-list for extension extendee
|
|
0, // [0:5] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_api_proto_auth_proto_init() }
|
|
func file_api_proto_auth_proto_init() {
|
|
if File_api_proto_auth_proto != nil {
|
|
return
|
|
}
|
|
file_api_proto_auth_proto_msgTypes[12].OneofWrappers = []any{}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_api_proto_auth_proto_rawDesc), len(file_api_proto_auth_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 15,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_api_proto_auth_proto_goTypes,
|
|
DependencyIndexes: file_api_proto_auth_proto_depIdxs,
|
|
MessageInfos: file_api_proto_auth_proto_msgTypes,
|
|
}.Build()
|
|
File_api_proto_auth_proto = out.File
|
|
file_api_proto_auth_proto_goTypes = nil
|
|
file_api_proto_auth_proto_depIdxs = nil
|
|
}
|