database

package
v0.0.0-...-ac266e4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2023 License: Unlicense Imports: 9 Imported by: 0

Documentation

Index

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) FindByID

func (p *PostgresDB) FindByID(id int) (*domain.User, error)

func (*PostgresDB) GetGormStudent

func (p *PostgresDB) GetGormStudent(id int) (domain.Student, error)

func (*PostgresDB) GetUsers

func (p *PostgresDB) GetUsers() ([]domain.User, error)

func (*PostgresDB) Save

func (p *PostgresDB) Save(u *domain.User) error

func (*PostgresDB) SaveGormStudent

func (p *PostgresDB) SaveGormStudent(gormStudent domain.Student) error

func (*PostgresDB) UpdateGormStudent

func (p *PostgresDB) UpdateGormStudent(gormStudent domain.Student) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL