Documentation ¶
Index ¶
- type PostgresDB
- func (p *PostgresDB) Close()
- func (p *PostgresDB) FindByID(id int) (*domain.User, error)
- func (p *PostgresDB) GetGormStudent(id int) (domain.Student, error)
- func (p *PostgresDB) GetUsers() ([]domain.User, error)
- func (p *PostgresDB) Save(u *domain.User) error
- func (p *PostgresDB) SaveGormStudent(gormStudent domain.Student) error
- func (p *PostgresDB) UpdateGormStudent(gormStudent domain.Student) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresDB ¶
type PostgresDB struct {
// contains filtered or unexported fields
}
func InitPostgresDB ¶
func InitPostgresDB() (*PostgresDB, error)
func NewPostgresDB ¶
func NewPostgresDB(connStr string) (*PostgresDB, error)
func (*PostgresDB) Close ¶
func (p *PostgresDB) Close()
func (*PostgresDB) GetGormStudent ¶
func (p *PostgresDB) GetGormStudent(id int) (domain.Student, error)
func (*PostgresDB) SaveGormStudent ¶
func (p *PostgresDB) SaveGormStudent(gormStudent domain.Student) error
func (*PostgresDB) UpdateGormStudent ¶
func (p *PostgresDB) UpdateGormStudent(gormStudent domain.Student) error
Click to show internal directories.
Click to hide internal directories.