auth_api

package module
v0.0.0-...-8f1e7f6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Auth_Register_FullMethodName      = "/auth.Auth/Register"
	Auth_Login_FullMethodName         = "/auth.Auth/Login"
	Auth_VerifyEmail_FullMethodName   = "/auth.Auth/VerifyEmail"
	Auth_RefreshTokens_FullMethodName = "/auth.Auth/RefreshTokens"
)

Variables

View Source
var Auth_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "auth.Auth",
	HandlerType: (*AuthServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Register",
			Handler:    _Auth_Register_Handler,
		},
		{
			MethodName: "Login",
			Handler:    _Auth_Login_Handler,
		},
		{
			MethodName: "VerifyEmail",
			Handler:    _Auth_VerifyEmail_Handler,
		},
		{
			MethodName: "RefreshTokens",
			Handler:    _Auth_RefreshTokens_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "protos/auth.proto",
}

Auth_ServiceDesc is the grpc.ServiceDesc for Auth service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_protos_auth_proto protoreflect.FileDescriptor

Functions

func RegisterAuthServer

func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)

Types

type AuthClient

type AuthClient interface {
	Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
	VerifyEmail(ctx context.Context, in *VerificationRequest, opts ...grpc.CallOption) (*VerificationResponse, error)
	RefreshTokens(ctx context.Context, in *RefreshRequest, opts ...grpc.CallOption) (*RefreshResponse, error)
}

AuthClient is the client API for Auth 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.

func NewAuthClient

func NewAuthClient(cc grpc.ClientConnInterface) AuthClient

type AuthServer

type AuthServer interface {
	Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
	Login(context.Context, *LoginRequest) (*LoginResponse, error)
	VerifyEmail(context.Context, *VerificationRequest) (*VerificationResponse, error)
	RefreshTokens(context.Context, *RefreshRequest) (*RefreshResponse, error)
	// contains filtered or unexported methods
}

AuthServer is the server API for Auth service. All implementations must embed UnimplementedAuthServer for forward compatibility.

type LoginRequest

type LoginRequest struct {
	Email    string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginRequest) Descriptor deprecated

func (*LoginRequest) Descriptor() ([]byte, []int)

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetEmail

func (x *LoginRequest) GetEmail() string

func (*LoginRequest) GetPassword

func (x *LoginRequest) GetPassword() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect

func (x *LoginRequest) ProtoReflect() protoreflect.Message

func (*LoginRequest) Reset

func (x *LoginRequest) Reset()

func (*LoginRequest) String

func (x *LoginRequest) String() string

type LoginResponse

type LoginResponse struct {
	Access  string `protobuf:"bytes,1,opt,name=access,proto3" json:"access,omitempty"`
	Refresh string `protobuf:"bytes,2,opt,name=refresh,proto3" json:"refresh,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginResponse) Descriptor deprecated

func (*LoginResponse) Descriptor() ([]byte, []int)

Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.

func (*LoginResponse) GetAccess

func (x *LoginResponse) GetAccess() string

func (*LoginResponse) GetRefresh

func (x *LoginResponse) GetRefresh() string

func (*LoginResponse) ProtoMessage

func (*LoginResponse) ProtoMessage()

func (*LoginResponse) ProtoReflect

func (x *LoginResponse) ProtoReflect() protoreflect.Message

func (*LoginResponse) Reset

func (x *LoginResponse) Reset()

func (*LoginResponse) String

func (x *LoginResponse) String() string

type RefreshRequest

type RefreshRequest struct {
	Refresh string `protobuf:"bytes,2,opt,name=refresh,proto3" json:"refresh,omitempty"`
	// contains filtered or unexported fields
}

func (*RefreshRequest) Descriptor deprecated

func (*RefreshRequest) Descriptor() ([]byte, []int)

Deprecated: Use RefreshRequest.ProtoReflect.Descriptor instead.

func (*RefreshRequest) GetRefresh

func (x *RefreshRequest) GetRefresh() string

func (*RefreshRequest) ProtoMessage

func (*RefreshRequest) ProtoMessage()

func (*RefreshRequest) ProtoReflect

func (x *RefreshRequest) ProtoReflect() protoreflect.Message

func (*RefreshRequest) Reset

func (x *RefreshRequest) Reset()

func (*RefreshRequest) String

func (x *RefreshRequest) String() string

type RefreshResponse

type RefreshResponse struct {
	Access  string `protobuf:"bytes,1,opt,name=access,proto3" json:"access,omitempty"`
	Refresh string `protobuf:"bytes,2,opt,name=refresh,proto3" json:"refresh,omitempty"`
	// contains filtered or unexported fields
}

func (*RefreshResponse) Descriptor deprecated

func (*RefreshResponse) Descriptor() ([]byte, []int)

Deprecated: Use RefreshResponse.ProtoReflect.Descriptor instead.

func (*RefreshResponse) GetAccess

func (x *RefreshResponse) GetAccess() string

func (*RefreshResponse) GetRefresh

func (x *RefreshResponse) GetRefresh() string

func (*RefreshResponse) ProtoMessage

func (*RefreshResponse) ProtoMessage()

func (*RefreshResponse) ProtoReflect

func (x *RefreshResponse) ProtoReflect() protoreflect.Message

func (*RefreshResponse) Reset

func (x *RefreshResponse) Reset()

func (*RefreshResponse) String

func (x *RefreshResponse) String() string

type RegisterRequest

type RegisterRequest struct {
	Email    string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterRequest) Descriptor deprecated

func (*RegisterRequest) Descriptor() ([]byte, []int)

Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.

func (*RegisterRequest) GetEmail

func (x *RegisterRequest) GetEmail() string

func (*RegisterRequest) GetPassword

func (x *RegisterRequest) GetPassword() string

func (*RegisterRequest) ProtoMessage

func (*RegisterRequest) ProtoMessage()

func (*RegisterRequest) ProtoReflect

func (x *RegisterRequest) ProtoReflect() protoreflect.Message

func (*RegisterRequest) Reset

func (x *RegisterRequest) Reset()

func (*RegisterRequest) String

func (x *RegisterRequest) String() string

type RegisterResponse

type RegisterResponse struct {
	UserId     int64  `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	VerifToken string `protobuf:"bytes,2,opt,name=verif_token,json=verifToken,proto3" json:"verif_token,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterResponse) Descriptor deprecated

func (*RegisterResponse) Descriptor() ([]byte, []int)

Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.

func (*RegisterResponse) GetUserId

func (x *RegisterResponse) GetUserId() int64

func (*RegisterResponse) GetVerifToken

func (x *RegisterResponse) GetVerifToken() string

func (*RegisterResponse) ProtoMessage

func (*RegisterResponse) ProtoMessage()

func (*RegisterResponse) ProtoReflect

func (x *RegisterResponse) ProtoReflect() protoreflect.Message

func (*RegisterResponse) Reset

func (x *RegisterResponse) Reset()

func (*RegisterResponse) String

func (x *RegisterResponse) String() string

type UnimplementedAuthServer

type UnimplementedAuthServer struct{}

UnimplementedAuthServer 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.

func (UnimplementedAuthServer) Login

func (UnimplementedAuthServer) RefreshTokens

func (UnimplementedAuthServer) Register

func (UnimplementedAuthServer) VerifyEmail

type UnsafeAuthServer

type UnsafeAuthServer interface {
	// contains filtered or unexported methods
}

UnsafeAuthServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthServer will result in compilation errors.

type VerificationRequest

type VerificationRequest struct {
	VerifToken string `protobuf:"bytes,1,opt,name=verif_token,json=verifToken,proto3" json:"verif_token,omitempty"`
	// contains filtered or unexported fields
}

func (*VerificationRequest) Descriptor deprecated

func (*VerificationRequest) Descriptor() ([]byte, []int)

Deprecated: Use VerificationRequest.ProtoReflect.Descriptor instead.

func (*VerificationRequest) GetVerifToken

func (x *VerificationRequest) GetVerifToken() string

func (*VerificationRequest) ProtoMessage

func (*VerificationRequest) ProtoMessage()

func (*VerificationRequest) ProtoReflect

func (x *VerificationRequest) ProtoReflect() protoreflect.Message

func (*VerificationRequest) Reset

func (x *VerificationRequest) Reset()

func (*VerificationRequest) String

func (x *VerificationRequest) String() string

type VerificationResponse

type VerificationResponse struct {
	Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*VerificationResponse) Descriptor deprecated

func (*VerificationResponse) Descriptor() ([]byte, []int)

Deprecated: Use VerificationResponse.ProtoReflect.Descriptor instead.

func (*VerificationResponse) GetError

func (x *VerificationResponse) GetError() string

func (*VerificationResponse) ProtoMessage

func (*VerificationResponse) ProtoMessage()

func (*VerificationResponse) ProtoReflect

func (x *VerificationResponse) ProtoReflect() protoreflect.Message

func (*VerificationResponse) Reset

func (x *VerificationResponse) Reset()

func (*VerificationResponse) String

func (x *VerificationResponse) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL