postgres

package
v0.0.0-...-71a5674 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	GetInstance() *sql.DB
	Ping() error
	Connect() error
	Disconnect() error
}

func NewDatabase

func NewDatabase(config DbConfig) Database

type DbConfig

type DbConfig struct {
	Type               string
	Host               string
	Port               uint16
	User               string
	Password           string
	DbName             string
	SSLMode            string
	MaxOpenConnections uint16
	MaxIdleConnections uint16
	QueryTimeout       time.Duration
	MigrationsPath     string
}

Jump to

Keyboard shortcuts

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