config

package
v1.5.13 Latest Latest
Warning

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

Go to latest
Published: May 7, 2025 License: Apache-2.0 Imports: 5 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            `env:"PG_SSLMODE" enum:"default,disable,allow,prefer,require,verify-ca,verify-full" help:"SSL mode"`
	Trace    pg.TraceFn        `json:"-" kong:"-"`
	Router   server.HTTPRouter `json:"-" kong:"-"`  // Which HTTP router to use
	Prefix   string            `help:"Path prefix"` // HTTP Path Prefix
}

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