Documentation ¶
Overview ¶
Package usercache contains user related CRUD functionality with caching.
Index ¶
- type Store
- func (s *Store) Count(ctx context.Context, filter userbus.QueryFilter) (int, error)
- func (s *Store) Create(ctx context.Context, usr userbus.User) error
- func (s *Store) Delete(ctx context.Context, usr userbus.User) error
- func (s *Store) NewWithTx(tx transaction.CommitRollbacker) (userbus.Storer, error)
- func (s *Store) Query(ctx context.Context, filter userbus.QueryFilter, orderBy order.By, ...) ([]userbus.User, error)
- func (s *Store) QueryByEmail(ctx context.Context, email mail.Address) (userbus.User, error)
- func (s *Store) QueryByID(ctx context.Context, userID uuid.UUID) (userbus.User, error)
- func (s *Store) Update(ctx context.Context, usr userbus.User) error
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
}
Store manages the set of APIs for user data and caching.
func (*Store) NewWithTx ¶
func (s *Store) NewWithTx(tx transaction.CommitRollbacker) (userbus.Storer, error)
NewWithTx constructs a new Store value replacing the sqlx DB value with a sqlx DB value that is currently inside a transaction.
func (*Store) Query ¶
func (s *Store) Query(ctx context.Context, filter userbus.QueryFilter, orderBy order.By, page page.Page) ([]userbus.User, error)
Query retrieves a list of existing users from the database.
func (*Store) QueryByEmail ¶
QueryByEmail gets the specified user from the database by email.
Click to show internal directories.
Click to hide internal directories.