Documentation
¶
Index ¶
- type Database
- func (db *Database) BeginTransaction() (pgx.Tx, error)
- func (db *Database) Close()
- func (db *Database) CommitTransaction(tx pgx.Tx) error
- func (db *Database) CountUserByEmail(email string) (int, error)
- func (db *Database) DeleteUser(tx pgx.Tx, id int64) error
- func (db *Database) InsertUser(tx pgx.Tx, email, password, fullName string) (int64, error)
- func (db *Database) RollbackTransaction(tx pgx.Tx) error
- func (db *Database) SelectIdAndPasswordByEmail(email string) (int64, string, error)
- func (db *Database) SelectUserById(id int64) (internal.User, error)
- func (db *Database) SelectUsers(limit int, offset int) ([]internal.User, error)
- func (db *Database) UpdateUserById(tx pgx.Tx, id int64, email, password, fullName string) error
- func (db *Database) UpdateUserPasswordById(tx pgx.Tx, id int64, password string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
func (*Database) BeginTransaction ¶
func (*Database) CommitTransaction ¶
func (*Database) DeleteUser ¶
func (*Database) InsertUser ¶
func (*Database) RollbackTransaction ¶
func (*Database) SelectIdAndPasswordByEmail ¶
func (*Database) SelectUserById ¶
func (*Database) SelectUsers ¶
func (*Database) UpdateUserById ¶
Click to show internal directories.
Click to hide internal directories.