395 lines
12 KiB
Go
395 lines
12 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/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 ValidateTokenRequest 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 *ValidateTokenRequest) Reset() {
|
|
*x = ValidateTokenRequest{}
|
|
mi := &file_api_proto_auth_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ValidateTokenRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ValidateTokenRequest) ProtoMessage() {}
|
|
|
|
func (x *ValidateTokenRequest) 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 ValidateTokenRequest.ProtoReflect.Descriptor instead.
|
|
func (*ValidateTokenRequest) Descriptor() ([]byte, []int) {
|
|
return file_api_proto_auth_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *ValidateTokenRequest) GetToken() string {
|
|
if x != nil {
|
|
return x.Token
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ValidateTokenResponse 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 *ValidateTokenResponse) Reset() {
|
|
*x = ValidateTokenResponse{}
|
|
mi := &file_api_proto_auth_proto_msgTypes[5]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ValidateTokenResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ValidateTokenResponse) ProtoMessage() {}
|
|
|
|
func (x *ValidateTokenResponse) 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 ValidateTokenResponse.ProtoReflect.Descriptor instead.
|
|
func (*ValidateTokenResponse) Descriptor() ([]byte, []int) {
|
|
return file_api_proto_auth_proto_rawDescGZIP(), []int{5}
|
|
}
|
|
|
|
func (x *ValidateTokenResponse) GetUserId() string {
|
|
if x != nil {
|
|
return x.UserId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
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\",\n" +
|
|
"\x14ValidateTokenRequest\x12\x14\n" +
|
|
"\x05token\x18\x01 \x01(\tR\x05token\"0\n" +
|
|
"\x15ValidateTokenResponse\x12\x17\n" +
|
|
"\auser_id\x18\x01 \x01(\tR\x06userId2\xc1\x01\n" +
|
|
"\vAuthService\x123\n" +
|
|
"\x06SignUp\x12\x13.auth.SignUpRequest\x1a\x14.auth.SignUpResponse\x123\n" +
|
|
"\x06SignIn\x12\x13.auth.SignInRequest\x1a\x14.auth.SignInResponse\x12H\n" +
|
|
"\rValidateToken\x12\x1a.auth.ValidateTokenRequest\x1a\x1b.auth.ValidateTokenResponseB\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, 6)
|
|
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
|
|
(*ValidateTokenRequest)(nil), // 4: auth.ValidateTokenRequest
|
|
(*ValidateTokenResponse)(nil), // 5: auth.ValidateTokenResponse
|
|
}
|
|
var file_api_proto_auth_proto_depIdxs = []int32{
|
|
0, // 0: auth.AuthService.SignUp:input_type -> auth.SignUpRequest
|
|
2, // 1: auth.AuthService.SignIn:input_type -> auth.SignInRequest
|
|
4, // 2: auth.AuthService.ValidateToken:input_type -> auth.ValidateTokenRequest
|
|
1, // 3: auth.AuthService.SignUp:output_type -> auth.SignUpResponse
|
|
3, // 4: auth.AuthService.SignIn:output_type -> auth.SignInResponse
|
|
5, // 5: auth.AuthService.ValidateToken:output_type -> auth.ValidateTokenResponse
|
|
3, // [3:6] is the sub-list for method output_type
|
|
0, // [0:3] 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_auth_proto_init() }
|
|
func file_api_proto_auth_proto_init() {
|
|
if File_api_proto_auth_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_auth_proto_rawDesc), len(file_api_proto_auth_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 6,
|
|
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
|
|
}
|