Documentation ¶
Index ¶
- Variables
- func RegisterAuthenticationServer(s grpc.ServiceRegistrar, srv AuthenticationServer)
- type AuthenticationClient
- type AuthenticationServer
- type CreateUserRequest
- func (*CreateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserRequest) GetEmail() string
- func (x *CreateUserRequest) GetPassword() string
- func (x *CreateUserRequest) GetUsername() string
- func (*CreateUserRequest) ProtoMessage()
- func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
- func (x *CreateUserRequest) Reset()
- func (x *CreateUserRequest) String() string
- type CreateUserResponse
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginRequest) GetPassword() string
- func (x *LoginRequest) GetUsername() string
- func (*LoginRequest) ProtoMessage()
- func (x *LoginRequest) ProtoReflect() protoreflect.Message
- func (x *LoginRequest) Reset()
- func (x *LoginRequest) String() string
- type LoginResponse
- func (*LoginResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LoginResponse) GetAccessExpiresAt() *timestamppb.Timestamp
- func (x *LoginResponse) GetAccessToken() string
- func (x *LoginResponse) GetRefreshExpiresAt() *timestamppb.Timestamp
- func (x *LoginResponse) GetRefreshToken() string
- func (x *LoginResponse) GetSessionId() string
- func (x *LoginResponse) GetUser() *User
- func (*LoginResponse) ProtoMessage()
- func (x *LoginResponse) ProtoReflect() protoreflect.Message
- func (x *LoginResponse) Reset()
- func (x *LoginResponse) String() string
- type RenewRequest
- type RenewResponse
- func (*RenewResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RenewResponse) GetAccessToken() string
- func (x *RenewResponse) GetExpiresAt() string
- func (*RenewResponse) ProtoMessage()
- func (x *RenewResponse) ProtoReflect() protoreflect.Message
- func (x *RenewResponse) Reset()
- func (x *RenewResponse) String() string
- type UnimplementedAuthenticationServer
- func (UnimplementedAuthenticationServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
- func (UnimplementedAuthenticationServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
- func (UnimplementedAuthenticationServer) Renew(context.Context, *RenewRequest) (*RenewResponse, error)
- func (UnimplementedAuthenticationServer) Verify(context.Context, *VerifyRequest) (*VerifyResponse, error)
- type UnsafeAuthenticationServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetCreatedAt() *timestamppb.Timestamp
- func (x *User) GetEmail() string
- func (x *User) GetPasswordChagedAt() *timestamppb.Timestamp
- func (x *User) GetUsername() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type VerifyRequest
- type VerifyResponse
- func (*VerifyResponse) Descriptor() ([]byte, []int)deprecated
- func (x *VerifyResponse) GetExpiresAt() *timestamppb.Timestamp
- func (x *VerifyResponse) GetId() int64
- func (x *VerifyResponse) GetIssuedAt() *timestamppb.Timestamp
- func (x *VerifyResponse) GetUsername() string
- func (*VerifyResponse) ProtoMessage()
- func (x *VerifyResponse) ProtoReflect() protoreflect.Message
- func (x *VerifyResponse) Reset()
- func (x *VerifyResponse) String() string
Constants ¶
This section is empty.
Variables ¶
var Authentication_ServiceDesc = grpc.ServiceDesc{ ServiceName: "remnants.Authentication", HandlerType: (*AuthenticationServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateUser", Handler: _Authentication_CreateUser_Handler, }, { MethodName: "Login", Handler: _Authentication_Login_Handler, }, { MethodName: "Verify", Handler: _Authentication_Verify_Handler, }, { MethodName: "Renew", Handler: _Authentication_Renew_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pb/auth-service.proto", }
Authentication_ServiceDesc is the grpc.ServiceDesc for Authentication service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_pb_auth_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthenticationServer ¶
func RegisterAuthenticationServer(s grpc.ServiceRegistrar, srv AuthenticationServer)
Types ¶
type AuthenticationClient ¶
type AuthenticationClient interface { CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*VerifyResponse, error) Renew(ctx context.Context, in *RenewRequest, opts ...grpc.CallOption) (*RenewResponse, error) }
AuthenticationClient is the client API for Authentication 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 NewAuthenticationClient ¶
func NewAuthenticationClient(cc grpc.ClientConnInterface) AuthenticationClient
type AuthenticationServer ¶
type AuthenticationServer interface { CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error) Login(context.Context, *LoginRequest) (*LoginResponse, error) Verify(context.Context, *VerifyRequest) (*VerifyResponse, error) Renew(context.Context, *RenewRequest) (*RenewResponse, error) // contains filtered or unexported methods }
AuthenticationServer is the server API for Authentication service. All implementations must embed UnimplementedAuthenticationServer for forward compatibility
type CreateUserRequest ¶
type CreateUserRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*CreateUserRequest) Descriptor
deprecated
func (*CreateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.
func (*CreateUserRequest) GetEmail ¶
func (x *CreateUserRequest) GetEmail() string
func (*CreateUserRequest) GetPassword ¶
func (x *CreateUserRequest) GetPassword() string
func (*CreateUserRequest) GetUsername ¶
func (x *CreateUserRequest) GetUsername() string
func (*CreateUserRequest) ProtoMessage ¶
func (*CreateUserRequest) ProtoMessage()
func (*CreateUserRequest) ProtoReflect ¶
func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
func (*CreateUserRequest) Reset ¶
func (x *CreateUserRequest) Reset()
func (*CreateUserRequest) String ¶
func (x *CreateUserRequest) String() string
type CreateUserResponse ¶
type CreateUserResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*CreateUserResponse) Descriptor
deprecated
func (*CreateUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead.
func (*CreateUserResponse) GetUser ¶
func (x *CreateUserResponse) GetUser() *User
func (*CreateUserResponse) ProtoMessage ¶
func (*CreateUserResponse) ProtoMessage()
func (*CreateUserResponse) ProtoReflect ¶
func (x *CreateUserResponse) ProtoReflect() protoreflect.Message
func (*CreateUserResponse) Reset ¶
func (x *CreateUserResponse) Reset()
func (*CreateUserResponse) String ¶
func (x *CreateUserResponse) String() string
type LoginRequest ¶
type LoginRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,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) GetPassword ¶
func (x *LoginRequest) GetPassword() string
func (*LoginRequest) GetUsername ¶
func (x *LoginRequest) GetUsername() 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 { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` SessionId string `protobuf:"bytes,2,opt,name=sessionId,proto3" json:"sessionId,omitempty"` AccessToken string `protobuf:"bytes,3,opt,name=accessToken,proto3" json:"accessToken,omitempty"` RefreshToken string `protobuf:"bytes,4,opt,name=refreshToken,proto3" json:"refreshToken,omitempty"` AccessExpiresAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=accessExpiresAt,proto3" json:"accessExpiresAt,omitempty"` RefreshExpiresAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=refreshExpiresAt,proto3" json:"refreshExpiresAt,omitempty"` // contains filtered or unexported fields }
func (*LoginResponse) Descriptor
deprecated
func (*LoginResponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.
func (*LoginResponse) GetAccessExpiresAt ¶
func (x *LoginResponse) GetAccessExpiresAt() *timestamppb.Timestamp
func (*LoginResponse) GetAccessToken ¶
func (x *LoginResponse) GetAccessToken() string
func (*LoginResponse) GetRefreshExpiresAt ¶
func (x *LoginResponse) GetRefreshExpiresAt() *timestamppb.Timestamp
func (*LoginResponse) GetRefreshToken ¶
func (x *LoginResponse) GetRefreshToken() string
func (*LoginResponse) GetSessionId ¶
func (x *LoginResponse) GetSessionId() string
func (*LoginResponse) GetUser ¶
func (x *LoginResponse) GetUser() *User
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 RenewRequest ¶
type RenewRequest struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*RenewRequest) Descriptor
deprecated
func (*RenewRequest) Descriptor() ([]byte, []int)
Deprecated: Use RenewRequest.ProtoReflect.Descriptor instead.
func (*RenewRequest) GetToken ¶
func (x *RenewRequest) GetToken() string
func (*RenewRequest) ProtoMessage ¶
func (*RenewRequest) ProtoMessage()
func (*RenewRequest) ProtoReflect ¶
func (x *RenewRequest) ProtoReflect() protoreflect.Message
func (*RenewRequest) Reset ¶
func (x *RenewRequest) Reset()
func (*RenewRequest) String ¶
func (x *RenewRequest) String() string
type RenewResponse ¶
type RenewResponse struct { AccessToken string `protobuf:"bytes,1,opt,name=accessToken,proto3" json:"accessToken,omitempty"` ExpiresAt string `protobuf:"bytes,2,opt,name=expiresAt,proto3" json:"expiresAt,omitempty"` // contains filtered or unexported fields }
func (*RenewResponse) Descriptor
deprecated
func (*RenewResponse) Descriptor() ([]byte, []int)
Deprecated: Use RenewResponse.ProtoReflect.Descriptor instead.
func (*RenewResponse) GetAccessToken ¶
func (x *RenewResponse) GetAccessToken() string
func (*RenewResponse) GetExpiresAt ¶
func (x *RenewResponse) GetExpiresAt() string
func (*RenewResponse) ProtoMessage ¶
func (*RenewResponse) ProtoMessage()
func (*RenewResponse) ProtoReflect ¶
func (x *RenewResponse) ProtoReflect() protoreflect.Message
func (*RenewResponse) Reset ¶
func (x *RenewResponse) Reset()
func (*RenewResponse) String ¶
func (x *RenewResponse) String() string
type UnimplementedAuthenticationServer ¶
type UnimplementedAuthenticationServer struct { }
UnimplementedAuthenticationServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthenticationServer) CreateUser ¶
func (UnimplementedAuthenticationServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
func (UnimplementedAuthenticationServer) Login ¶
func (UnimplementedAuthenticationServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
func (UnimplementedAuthenticationServer) Renew ¶
func (UnimplementedAuthenticationServer) Renew(context.Context, *RenewRequest) (*RenewResponse, error)
func (UnimplementedAuthenticationServer) Verify ¶
func (UnimplementedAuthenticationServer) Verify(context.Context, *VerifyRequest) (*VerifyResponse, error)
type UnsafeAuthenticationServer ¶
type UnsafeAuthenticationServer interface {
// contains filtered or unexported methods
}
UnsafeAuthenticationServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthenticationServer will result in compilation errors.
type User ¶
type User struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` PasswordChagedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=passwordChagedAt,proto3" json:"passwordChagedAt,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=createdAt,proto3" json:"createdAt,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetCreatedAt ¶
func (x *User) GetCreatedAt() *timestamppb.Timestamp
func (*User) GetPasswordChagedAt ¶
func (x *User) GetPasswordChagedAt() *timestamppb.Timestamp
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type VerifyRequest ¶
type VerifyRequest struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*VerifyRequest) Descriptor
deprecated
func (*VerifyRequest) Descriptor() ([]byte, []int)
Deprecated: Use VerifyRequest.ProtoReflect.Descriptor instead.
func (*VerifyRequest) GetToken ¶
func (x *VerifyRequest) GetToken() string
func (*VerifyRequest) ProtoMessage ¶
func (*VerifyRequest) ProtoMessage()
func (*VerifyRequest) ProtoReflect ¶
func (x *VerifyRequest) ProtoReflect() protoreflect.Message
func (*VerifyRequest) Reset ¶
func (x *VerifyRequest) Reset()
func (*VerifyRequest) String ¶
func (x *VerifyRequest) String() string
type VerifyResponse ¶
type VerifyResponse struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` IssuedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=issuedAt,proto3" json:"issuedAt,omitempty"` ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expiresAt,proto3" json:"expiresAt,omitempty"` // contains filtered or unexported fields }
func (*VerifyResponse) Descriptor
deprecated
func (*VerifyResponse) Descriptor() ([]byte, []int)
Deprecated: Use VerifyResponse.ProtoReflect.Descriptor instead.
func (*VerifyResponse) GetExpiresAt ¶
func (x *VerifyResponse) GetExpiresAt() *timestamppb.Timestamp
func (*VerifyResponse) GetId ¶
func (x *VerifyResponse) GetId() int64
func (*VerifyResponse) GetIssuedAt ¶
func (x *VerifyResponse) GetIssuedAt() *timestamppb.Timestamp
func (*VerifyResponse) GetUsername ¶
func (x *VerifyResponse) GetUsername() string
func (*VerifyResponse) ProtoMessage ¶
func (*VerifyResponse) ProtoMessage()
func (*VerifyResponse) ProtoReflect ¶
func (x *VerifyResponse) ProtoReflect() protoreflect.Message
func (*VerifyResponse) Reset ¶
func (x *VerifyResponse) Reset()
func (*VerifyResponse) String ¶
func (x *VerifyResponse) String() string