Documentation ¶
Index ¶
- func MigrateSchema(dsn string) error
- func NewDB(cfg *config.DB) (*sqlx.DB, error)
- type UserDB
- func (u *UserDB) CreateUser(ctx context.Context, user models.User, tx *sqlx.Tx) (int, error)
- func (u *UserDB) ExistsEmail(ctx context.Context, email string) (bool, error)
- func (u *UserDB) GetUser(ctx context.Context, email, password string) (models.User, error)
- func (u *UserDB) InTx(ctx context.Context, opts *sql.TxOptions, fn func(tx *sqlx.Tx) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MigrateSchema ¶
Types ¶
type UserDB ¶
type UserDB struct {
// contains filtered or unexported fields
}
func (*UserDB) CreateUser ¶
func (*UserDB) ExistsEmail ¶
Click to show internal directories.
Click to hide internal directories.