Documentation
¶
Index ¶
- func MigrateSchema(cfg *config.DB) error
- func NewPostgresDB(cfg *config.DB) (*sqlx.DB, error)
- type Repository
- type UserPostgres
- func (u *UserPostgres) Create(ctx context.Context, user *models.User) (int, error)
- func (u *UserPostgres) Delete(ctx context.Context, id int) (bool, error)
- func (u *UserPostgres) GetAll(ctx context.Context) ([]*models.User, error)
- func (u *UserPostgres) GetByEmail(ctx context.Context, email string) (*models.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MigrateSchema ¶
Types ¶
type Repository ¶
type Repository struct {
*UserPostgres
}
func NewRepository ¶
func NewRepository(db *sqlx.DB) *Repository
type UserPostgres ¶
type UserPostgres struct {
// contains filtered or unexported fields
}
func NewUserPostgres ¶
func NewUserPostgres(db *sqlx.DB) *UserPostgres
func (*UserPostgres) GetByEmail ¶
Click to show internal directories.
Click to hide internal directories.