Documentation ¶
Index ¶
- type Store
- func (s *Store) Count(ctx context.Context, filter user.QueryFilter) (int, error)
- func (s *Store) Create(ctx context.Context, usr user.User) error
- func (s *Store) Delete(ctx context.Context, usr user.User) error
- func (s *Store) Query(ctx context.Context, filter user.QueryFilter, orderBy order.By, pageNumber int, ...) ([]user.User, error)
- func (s *Store) QueryByEmail(ctx context.Context, email mail.Address) (user.User, error)
- func (s *Store) QueryByID(ctx context.Context, userID uuid.UUID) (user.User, error)
- func (s *Store) QueryByIDs(ctx context.Context, userIDs []uuid.UUID) ([]user.User, error)
- func (s *Store) Update(ctx context.Context, usr user.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 database access.
func NewStore ¶
func NewStore(log *zap.SugaredLogger, db *sqlx.DB) *Store
NewStore constructs the API for data access.
func (*Store) Query ¶
func (s *Store) Query(ctx context.Context, filter user.QueryFilter, orderBy order.By, pageNumber int, rowsPerPage int) ([]user.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.
func (*Store) QueryByIDs ¶
QueryByIDs gets the specified users from the database.
Click to show internal directories.
Click to hide internal directories.