Documentation
¶
Index ¶
- Variables
- func NewStore(db *sqlx.DB, log logging.Logger) user.Store
- func NewUserStore(db *database.Database, logger logging.Logger) user.Store
- type Store
- func (s *Store) Create(ctx context.Context, u *user.User) error
- func (s *Store) Delete(ctx context.Context, id uint) error
- func (s *Store) GetByEmail(ctx context.Context, email string) (*user.User, error)
- func (s *Store) GetByID(ctx context.Context, id uint) (*user.User, error)
- func (s *Store) GetUserIDs(ctx context.Context) ([]string, error)
- func (s *Store) List(ctx context.Context) ([]user.User, error)
- func (s *Store) Update(ctx context.Context, u *user.User) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUserNotFound is returned when a user cannot be found in the store ErrUserNotFound = errors.New("user not found") )
Functions ¶
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements the user.Store interface using a SQL database
func (*Store) GetByEmail ¶
GetByEmail retrieves a user by email
func (*Store) GetUserIDs ¶
GetUserIDs retrieves all user IDs from the store
Click to show internal directories.
Click to hide internal directories.