db

package
v0.0.0-...-cb15c0d Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2018 License: BSD-2-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetDefaultViperOptions

func SetDefaultViperOptions() error

Types

type Config

type Config struct {
	Scheme             string        `mapstructure:"scheme"`
	User               string        `mapstructure:"user"`
	Password           string        `mapstructure:"password"`
	Host               string        `mapstructure:"host"`
	Port               uint16        `mapstructure:"port"`
	Database           string        `mapstructure:"database"`
	UseTLSClientAuth   bool          `mapstructure:"use_tls_client_auth"`
	CAPath             string        `mapstructure:"ca_path"`
	CertPath           string        `mapstructure:"cert_path"`
	KeyPath            string        `mapstructure:"key_path"`
	ConnTimeout        time.Duration `mapstructure:"conn_timeout"`
	InsecureSkipVerify bool          `mapstructure:"insecure_skip_verify"`
}

func (*Config) TLSConfig

func (p *Config) TLSConfig() (*tls.Config, error)

type Pool

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

func New

func New(cfg Config) (*Pool, error)

func (*Pool) Close

func (p *Pool) Close() error

func (*Pool) Ping

func (p *Pool) Ping() error

func (*Pool) Pool

func (p *Pool) Pool() *pgx.ConnPool

func (*Pool) STDDB

func (p *Pool) STDDB() (*sql.DB, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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