pg

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: Apache-2.0 Imports: 4 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 {
	DataSource     string `` /* 187-byte string literal not displayed */
	MigrateOnStart bool   `yaml:"migrate_on_start" env:"DB_MIGRATE_ON_START" env-default:"true" env-description:"Apply database migrations on start"`
}

type Connection

type Connection struct {
	*pgxpool.Pool
	// contains filtered or unexported fields
}

func Open

func Open(ctx context.Context, cfg Config, logger *zerolog.Logger) (*Connection, error)

func (*Connection) Shutdown

func (c *Connection) Shutdown() error

Jump to

Keyboard shortcuts

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