pgx

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 8 Imported by: 0

README

pgx

A module to work with PostgreSQL using PGX package in the Modulus Framework based application

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewManifesto

func NewManifesto() module.Manifesto

func NewModule

func NewModule() *module.Module

func NewPgxPool

func NewPgxPool(
	logger *slog.Logger,
	config ModuleConfig,
) (*pgxpool.Pool, error)

Types

type ConnectionConfig

type ConnectionConfig struct {
	Host     string `env:"HOST, default=localhost"`
	Port     int    `env:"PORT, default=5432"`
	User     string `env:"USER, default=postgres"`
	Password string `env:"PASSWORD, default=foobar"`
	Database string `env:"DB_NAME, default=test"`
	SslMode  string `env:"SSL_MODE, default=disable"`
}

func (ConnectionConfig) Dsn

func (c ConnectionConfig) Dsn() string

type ModuleConfig

type ModuleConfig struct {
	DSN string `` /* 200-byte string literal not displayed */

	ConnectionConfig *ConnectionConfig `env:",prefix=PG_"`
}

func (ModuleConfig) Dsn

func (c ModuleConfig) Dsn() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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