config

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2019 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPostgresConfig = Config{
	// contains filtered or unexported fields
}

Functions

func NewPostgresPool

func NewPostgresPool(config Config) (*pool.ConnectionPool, error)

func PostgresConnStringFromConfig

func PostgresConnStringFromConfig(config Config) string

func PostgresPool

func PostgresPool(options ...Option) (*pool.ConnectionPool, error)

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

type Option

type Option func(*Config) error

func DatabaseName

func DatabaseName(name string) Option

func Host

func Host(host string) Option

func Password

func Password(password string) Option

func Port

func Port(port int) Option

func PostgresExtraConnArgs

func PostgresExtraConnArgs(extraArgs string) Option

func PostgresSSLModeOption

func PostgresSSLModeOption(sslMode PostgresSSLMode) Option

func PostgresType

func PostgresType() Option

func Username

func Username(username string) Option

type PostgresSSLMode

type PostgresSSLMode int

PostgresSSLMode defines the modes for postgress ssl.

const (
	PostgresSSLDisable PostgresSSLMode
	PostgresSSLAllow
	PostgresSSLPrefer
	PostgresSSLRequire
	PostgresSSLVerifyCA
	PostgresSSLVerifyFull
)

This defines the modes for requiring ssl in a postgres database. See: https://www.postgresql.org/docs/current/libpq-ssl.html

func (PostgresSSLMode) String

func (self PostgresSSLMode) String() string

Jump to

Keyboard shortcuts

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