Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresConn ¶
func NewPostgresConnection ¶
func NewPostgresConnection(c models.PostgresConfig, l *zerolog.Logger) (db *PostgresConn, err error)
NewPostgresConnection - returns a PostgresConn connection and its conenct string for reference. This can then be passed down through the service so that multiple connections do need to be made unncessarily.
type Postgreser ¶
type Postgreser interface { AllTasks() ([]models.Task, error) EmployeeByID(ID string) (models.Employee, error) EmployeeByNickname(nickname string) (models.Employee, error) AllEmployees() ([]models.Employee, error) }
func New ¶
func New( conn *PostgresConn, l *zerolog.Logger, ) Postgreser
Click to show internal directories.
Click to hide internal directories.