services

package
v0.0.0-...-346be84 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2024 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

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

func (s *UserService) GetUserByEmail(login *models.Login) (*models.User, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL