usersvc

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserSvc

type UserSvc struct {
	// contains filtered or unexported fields
}

UserSvc represents a user services

func NewUserSvc

func NewUserSvc(userRepo contracts.UserRepository, notificationSvc contracts.NotificationService) *UserSvc

NewUserSvc creates a new UserSvc

func (UserSvc) CreateUser

func (svc UserSvc) CreateUser(email, password string) (entities.User, error)

CreateUser creates a new user record given their email and password and returns the user record or returns an error

func (UserSvc) GetByVerificationToken

func (svc UserSvc) GetByVerificationToken(verificationToken string) (entities.User, error)

GetByVerificationToken gets a user provided their verification token

func (UserSvc) GetUserByEmail

func (svc UserSvc) GetUserByEmail(email string) (entities.User, error)

GetUserByEmail retrieve a user record given their email address or returns an error

func (UserSvc) GetUserByID

func (svc UserSvc) GetUserByID(id string) (entities.User, error)

GetUserByID retrieves a user given their id or returns an error

func (UserSvc) RemoveUser

func (svc UserSvc) RemoveUser(id string) error

RemoveUser remeves a user record

func (UserSvc) SetVerified

func (svc UserSvc) SetVerified(id identifier.ID) error

Jump to

Keyboard shortcuts

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