Documentation ¶
Index ¶
- type AuthResponse
- type AuthUseCase
- func (au *AuthUseCase) GetToken(user entities.User) (AuthResponse, error)
- func (au *AuthUseCase) Login(data LoginDTORequest) (AuthResponse, error)
- func (au *AuthUseCase) Logout(data LogoutDTORequest) (LogoutDTOResponse, error)
- func (au *AuthUseCase) Register(data RegisterDTORequest) (AuthResponse, error)
- type AuthUseCaseInterface
- type LoginDTORequest
- type LogoutDTORequest
- type LogoutDTOResponse
- type RegisterDTORequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthResponse ¶
type AuthResponse struct { UserID uint `json:"user_id" example:"1"` Email string `json:"email" example:"[email protected]"` Payload string `json:"payload" example:"Bearer"` TokenType string `json:"token_type" example:"aa3f97cec3f342bc9b11e0592bbce319"` } //@name AuthResponse
type AuthUseCase ¶
type AuthUseCase struct {
// contains filtered or unexported fields
}
func (*AuthUseCase) GetToken ¶
func (au *AuthUseCase) GetToken(user entities.User) (AuthResponse, error)
func (*AuthUseCase) Login ¶
func (au *AuthUseCase) Login(data LoginDTORequest) (AuthResponse, error)
func (*AuthUseCase) Logout ¶
func (au *AuthUseCase) Logout(data LogoutDTORequest) (LogoutDTOResponse, error)
func (*AuthUseCase) Register ¶
func (au *AuthUseCase) Register(data RegisterDTORequest) (AuthResponse, error)
type AuthUseCaseInterface ¶
type AuthUseCaseInterface interface { Login(data LoginDTORequest) (AuthResponse, error) Register(data RegisterDTORequest) (AuthResponse, error) Logout(data LogoutDTORequest) (LogoutDTOResponse, error) }
func NewAuthUseCase ¶
func NewAuthUseCase(userService user.UserUseCaseInterface, appConfig configs.AppConfig, redisClient *redis.Client) AuthUseCaseInterface
type LoginDTORequest ¶
type LoginDTORequest struct { Email string `json:"email" example:"[email protected]" form:"email"` Password string `json:"password" example:"secret" form:"password"` } // @name LoginRequest
type LogoutDTORequest ¶
type LogoutDTOResponse ¶
type LogoutDTOResponse struct { Status string `json:"status" example:"success"` } //@name LogoutResponse
type RegisterDTORequest ¶
type RegisterDTORequest struct { Email string `json:"email" example:"[email protected]" form:"email"` Name string `json:"name" example:"John Doe" form:"name"` Password string `json:"password" example:"secret" form:"password"` } //@name RegisterRequest
Click to show internal directories.
Click to hide internal directories.