pg

package
v0.0.0-...-67402a3 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDB

func NewDB(config PGConfig) (*sqlx.DB, error)

Types

type PGConfig

type PGConfig struct {
	ConnectionString     string `default:"postgres://postgres:postgres@localhost:5432/promo_db"`
	ConnectTimeout       int    `default:"5000"`
	PreferSimpleProtocol bool   `default:"true"`
	MaxOpenConns         int    `default:"100"`
	MaxIdleConns         int    `default:"1"`
}

Jump to

Keyboard shortcuts

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