Documentation
¶
Index ¶
- Constants
- func AfterConnectMap(conn *pgx.Conn) error
- func NewPgxPool(config *PostgresConfig) (*pgx.ConnPool, error)
- func NewPgxPoolAfterConnect(config *PostgresConfig, afterConnectMap func(*pgx.Conn) error, debug bool) (*pgx.ConnPool, error)
- func NewPgxPoolAfterConnectZap(config *PostgresZapConfig, afterConnectMap func(*pgx.Conn) error, debug bool) (*pgx.ConnPool, error)
- type PostgresConfig
- type PostgresZapConfig
Constants ¶
View Source
const (
PgxMaxConnect = 5
)
Variables ¶
This section is empty.
Functions ¶
func AfterConnectMap ¶
func NewPgxPool ¶
func NewPgxPool(config *PostgresConfig) (*pgx.ConnPool, error)
func NewPgxPoolAfterConnect ¶
Types ¶
type PostgresConfig ¶
type PostgresConfig struct {
User string `json:"User"`
Password string `json:"Password"`
Database string `json:"Database"`
Port int `json:"Port"`
Host string `json:"Host"`
Logger pgx.Logger `json:"-"`
}
func (*PostgresConfig) SetLogger ¶
func (postgresConfig *PostgresConfig) SetLogger(logger zerolog.Logger)
func (*PostgresConfig) SetZapLogger ¶ added in v0.2.2
func (postgresConfig *PostgresConfig) SetZapLogger(logger *zap.Logger)
type PostgresZapConfig ¶
Click to show internal directories.
Click to hide internal directories.