userdb

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 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 Store

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

func NewStore

func NewStore(log *zerolog.Logger, client *mongo.Client) *Store

func (*Store) Count

func (s *Store) Count(ctx context.Context, filter user.QueryFilter) (int, error)

func (*Store) Create

func (s *Store) Create(ctx context.Context, usr user.User) (user.User, error)

NOTE: add email verification in the future NOTE: add email verification in the future

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, usr user.User) error

func (*Store) Query

func (s *Store) Query(ctx context.Context, filter user.QueryFilter, orderBy order.By, pageNumber int, rowsPerPage int) ([]user.User, error)

func (*Store) QueryByEmail

func (s *Store) QueryByEmail(ctx context.Context, email mail.Address) (user.User, error)

func (*Store) QueryByID

func (s *Store) QueryByID(ctx context.Context, userID string) (user.User, error)

func (*Store) QueryByIDs

func (s *Store) QueryByIDs(ctx context.Context, userIDs []string) ([]user.User, error)

func (*Store) Update

func (s *Store) Update(ctx context.Context, usr user.User) error

Jump to

Keyboard shortcuts

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