infrastructures

package
v0.0.0-...-3e6b536 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPgxConn

func GetPgxConn() *pgxpool.Pool

Types

type PgxConfig

type PgxConfig struct {
	DSN             string
	SQLMaxIdleConns int
	SQLMaxOpenConns int
}

type PgxConnSingleton

type PgxConnSingleton struct {
	// contains filtered or unexported fields
}

func GetPgxConnInstance

func GetPgxConnInstance() *PgxConnSingleton

func NewPgxConnInstance

func NewPgxConnInstance(config PgxConfig) *PgxConnSingleton

func (*PgxConnSingleton) ClosePgx

func (p *PgxConnSingleton) ClosePgx()

func (*PgxConnSingleton) ConnectPgx

func (p *PgxConnSingleton) ConnectPgx() error

func (*PgxConnSingleton) GetPgxConn

func (p *PgxConnSingleton) GetPgxConn() *pgxpool.Pool

func (*PgxConnSingleton) WithConfig

func (p *PgxConnSingleton) WithConfig(config PgxConfig) *PgxConnSingleton

Jump to

Keyboard shortcuts

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