pg

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTask

func NewTask(conn pg.PoolConn) *pgpool

Types

type Config

type Config struct {
	Addr     string     `name:"host" env:"PG_HOST" default:"localhost" help:"Server address, <host> or <host>:<port>"`
	User     string     `env:"PG_USER" default:"${USER}" help:"Database user"`
	Pass     string     `env:"PG_PASSWORD" help:"User password"`
	Database string     `env:"PG_DATABASE" help:"Database name, uses username if not set"`
	SSLMode  string     `default:"default" enum:"default,disable,allow,prefer,require,verify-ca,verify-full" help:"SSL mode"`
	Trace    pg.TraceFn `kong:"-"`
}

func (Config) Description

func (c Config) Description() string

func (Config) Name

func (c Config) Name() string

func (Config) New

func (c Config) New(ctx context.Context) (server.Task, error)

Jump to

Keyboard shortcuts

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