Documentation ¶
Index ¶
- type UserService
- func (s *UserService) CheckIfEmailExist(email string) bool
- func (s *UserService) CreateUser(user *models.User) error
- func (s *UserService) DeleteUser(userID string) error
- func (s *UserService) GetUser(userID string) (*models.User, error)
- func (s *UserService) GetUserByEmail(login *models.Login) (*models.User, error)
- func (s *UserService) UpdateUser(userID string, user *models.User) error
- func (s *UserService) VerifyUser(userID string, token string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(db *mongo.Database) *UserService
func (*UserService) CheckIfEmailExist ¶
func (s *UserService) CheckIfEmailExist(email string) bool
Check if email address exist
func (*UserService) CreateUser ¶
func (s *UserService) CreateUser(user *models.User) error
Create New User
func (*UserService) DeleteUser ¶
func (s *UserService) DeleteUser(userID string) error
DeleteUser deletes a user by ID
func (*UserService) GetUser ¶
func (s *UserService) GetUser(userID string) (*models.User, error)
GetUser retrieves a user by ID
func (*UserService) GetUserByEmail ¶
Get user by Email
func (*UserService) UpdateUser ¶
func (s *UserService) UpdateUser(userID string, user *models.User) error
UpdateUser updates user information
func (*UserService) VerifyUser ¶
func (s *UserService) VerifyUser(userID string, token string) error
Verify User with verification Token
Click to show internal directories.
Click to hide internal directories.