Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildConnectionString ¶
func BuildConnectionString() string
BuildConnectionString builds a Postgresql connection string. Extracts its different sections from environmental variables
func BuildConnectionURL ¶
func BuildConnectionURL() string
BuildConnectionURL builds a Postgresql connection url. Extracts its different sections from environmental variables. Format: postgres://user:password@host:port/dbname
Types ¶
type Pooler ¶
type Pooler interface { Begin(ctx context.Context) (pgx.Tx, error) Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error) Query(ctx context.Context, sql string, optionsAndArgs ...interface{}) (pgx.Rows, error) QueryRow(ctx context.Context, sql string, optionsAndArgs ...interface{}) pgx.Row }
Pooler abstracts connection pool methods
var Db Pooler
Db creates an exported global variable to hold the database connection pool.
Click to show internal directories.
Click to hide internal directories.