Documentation ¶
Index ¶
- type Database
- type PgDB
- func (d *PgDB) DeleteUser(ctx context.Context, id uint) error
- func (d *PgDB) GetAllUsers(ctx context.Context) ([]models.User, error)
- func (d *PgDB) GetUserByID(ctx context.Context, id uint) (*models.User, error)
- func (d *PgDB) GetUserByUsername(ctx context.Context, username string) (*models.User, error)
- func (d *PgDB) SaveUser(ctx context.Context, user *models.User) (*models.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface { SaveUser(ctx context.Context, user *models.User) (*models.User, error) GetAllUsers(ctx context.Context) ([]models.User, error) DeleteUser(ctx context.Context, id uint) error GetUserByID(ctx context.Context, id uint) (*models.User, error) GetUserByUsername(ctx context.Context, username string) (*models.User, error) }
type PgDB ¶
type PgDB struct {
// contains filtered or unexported fields
}
func (*PgDB) GetUserByID ¶
func (*PgDB) GetUserByUsername ¶
Click to show internal directories.
Click to hide internal directories.