Documentation ¶
Index ¶
- func GetAlreadyExistsErrorKeyValue(err *pq.Error) (string, string)
- func MigrateUp(t *testing.T, db *sql.DB) error
- func NewDefaultPostgresConfig(dbName string) pgTools.Config
- func SetUpDB(t *testing.T, dbName string, superUserPGConfig pgTools.Config) (*sql.DB, error)
- func SetUpUserRepo(t *testing.T, sqlxDB *sqlx.DB) (domain.UserRepo, []*domain.User)
- type PGLoginRepo
- type PGUserRepo
- func (r *PGUserRepo) Create(user *domain.User, password *domain.Password) (*domain.User, error)
- func (r *PGUserRepo) GetByID(id uuid.UUID) (*domain.User, error)
- func (r *PGUserRepo) GetByUsername(username string) (*domain.User, error)
- func (r *PGUserRepo) VerifyPassword(username string, password string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultPostgresConfig ¶
NewDefaultPostgresConfig creates and return a default postgres configuration.
Types ¶
type PGLoginRepo ¶
type PGLoginRepo struct {
// contains filtered or unexported fields
}
func NewPGLoginRepo ¶
func NewPGLoginRepo(db *sqlx.DB, userRepo domain.UserRepo) *PGLoginRepo
type PGUserRepo ¶
type PGUserRepo struct {
// contains filtered or unexported fields
}
func NewPGUserRepo ¶
func NewPGUserRepo(db *sqlx.DB, hasher domain.Hasher) *PGUserRepo
func (*PGUserRepo) GetByUsername ¶
func (r *PGUserRepo) GetByUsername(username string) (*domain.User, error)
func (*PGUserRepo) VerifyPassword ¶
func (r *PGUserRepo) VerifyPassword(username string, password string) (bool, error)
Click to show internal directories.
Click to hide internal directories.