Documentation
¶
Index ¶
- type Handler
- type Repository
- func (r *Repository) CreateUser(user *types.User) error
- func (r *Repository) GetUserByEmail(email string) (*types.User, error)
- func (r *Repository) GetUserByUsername(username string) (*types.User, error)
- func (r *Repository) IsEmailExist(email string) bool
- func (r *Repository) IsUsernameExist(username string) bool
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(service types.AuthService) *Handler
func (*Handler) ForgotPassword ¶
func (h *Handler) ForgotPassword(w http.ResponseWriter, r *http.Request)
func (*Handler) RegisterRoutes ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db *gorm.DB) *Repository
func (*Repository) CreateUser ¶
func (r *Repository) CreateUser(user *types.User) error
func (*Repository) GetUserByEmail ¶
func (r *Repository) GetUserByEmail(email string) (*types.User, error)
func (*Repository) GetUserByUsername ¶
func (r *Repository) GetUserByUsername(username string) (*types.User, error)
func (*Repository) IsEmailExist ¶
func (r *Repository) IsEmailExist(email string) bool
func (*Repository) IsUsernameExist ¶
func (r *Repository) IsUsernameExist(username string) bool
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repo types.AuthRepository) *Service
Click to show internal directories.
Click to hide internal directories.