Documentation
¶
Index ¶
- func CreateUser(ctx context.Context, email, password string, userService *Service, ...) error
- func NewRepository(db *gorm.DB) *repository
- func Routes(r *gin.Engine, authenticationMiddleware middleware.AuthenticationMiddleware, ...)
- type Handler
- func (h Handler) Delete(c *gin.Context)
- func (h Handler) FindAll(c *gin.Context)
- func (h Handler) FindById(c *gin.Context)
- func (h Handler) Me(c *gin.Context)
- func (h Handler) RefreshToken(c *gin.Context)
- func (h Handler) RequestPasswordReset(c *gin.Context)
- func (h Handler) ResetPassword(c *gin.Context)
- func (h Handler) SignIn(c *gin.Context)
- func (h Handler) SignOut(c *gin.Context)
- func (h Handler) SignUp(c *gin.Context)
- func (h Handler) Update(c *gin.Context)
- func (h Handler) ValidateEmail(c *gin.Context)
- type RefreshTokenRequest
- type RequestPasswordResetRequest
- type ResetPasswordRequest
- type Service
- func (s Service) Delete(ctx context.Context, id uint) error
- func (s Service) FindAll(ctx context.Context) ([]*model.User, error)
- func (s Service) FindById(ctx context.Context, id uint) (*model.User, error)
- func (s Service) FindOrCreate(ctx context.Context, email string, password string) (*model.User, error)
- func (s Service) RequestPasswordReset(ctx context.Context, email string) error
- func (s Service) ResetPassword(ctx context.Context, token string, password string) error
- func (s Service) Save(ctx context.Context, user *model.User) error
- func (s Service) SignIn(ctx context.Context, email string, password string) (*model.User, error)
- func (s Service) SignUp(ctx context.Context, email string, password string) (*model.User, error)
- func (s Service) Update(ctx context.Context, id uint, email, password string) (*model.User, error)
- func (s Service) ValidateEmail(ctx context.Context, token uuid.UUID) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateUser ¶
func NewRepository ¶
func Routes ¶
func Routes(r *gin.Engine, authenticationMiddleware middleware.AuthenticationMiddleware, authorizationMiddleware middleware.AuthorizationMiddleware, handler Handler)
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (Handler) RequestPasswordReset ¶
func (Handler) ResetPassword ¶
func (Handler) ValidateEmail ¶
ValidateEmail validate users email
type RefreshTokenRequest ¶
type RefreshTokenRequest struct {
RefreshToken string `json:"refreshToken"`
}
type RequestPasswordResetRequest ¶
type RequestPasswordResetRequest struct {
Email string `json:"email" binding:"required,email"`
}
type ResetPasswordRequest ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (Service) FindOrCreate ¶
func (Service) RequestPasswordReset ¶
func (Service) ResetPassword ¶
Click to show internal directories.
Click to hide internal directories.