userepo

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserRepo

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

func NewUserRepo

func NewUserRepo(dbClient *mongo.Collection, ctx context.Context) *UserRepo

func (*UserRepo) CreateUser

func (u *UserRepo) CreateUser(user entities.User) (entities.User, error)

CreateUser creates a single user

func (*UserRepo) GetByEmail

func (u *UserRepo) GetByEmail(email string) (entities.User, error)

GetByEmail gets a user given an email address

func (*UserRepo) GetById

func (u *UserRepo) GetById(id string) (entities.User, error)

GetById returns a user record given the id

func (*UserRepo) GetByVerificationToken

func (u *UserRepo) GetByVerificationToken(verificationToken string) (entities.User, error)

func (*UserRepo) RemoveUser

func (u *UserRepo) RemoveUser(id string) error

RemoveUser deletes a user record given its id

func (*UserRepo) SetVerified

func (u *UserRepo) SetVerified(id identifier.ID) error

Jump to

Keyboard shortcuts

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