Help us shape the future of Go! Take the 2026 Go Developer Survey

postgres

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DSN               string
	Host              string
	User              string
	Port              uint
	Name              string
	ConnectionTimeout uint
	Password          string
	SSLMode           string
	SSLCertPath       string
	SSLKeyPath        string
	SSLRootCertPath   string
}

func NewDefaultConfig

func NewDefaultConfig() Config

func (*Config) CreateDSN added in v0.10.0

func (c *Config) CreateDSN() string

type Params

type Params struct {
	fx.In
	Config Config
	Logger *zap.SugaredLogger
}

type Result

type Result struct {
	fx.Out
	PgxPool     lazy.Lazy[*pgxpool.Pool]
	SQLDB       lazy.Lazy[*sql.DB]
	PgxPoolWait *sync.WaitGroup `name:"pgx_pool_wait"`
	AppHook     fx.Hook         `group:"app_hooks"`
}

func New

func New(p Params) (Result, error)

Jump to

Keyboard shortcuts

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