pg

package
v0.0.0-...-8d3a452 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMissingAddress = errors.New("Database address is required but not set")
View Source
var ErrMissingPort = errors.New("Database port number is required but not set")

Functions

func OpenDb

func OpenDb(connConfig PostgresConfig) (*sql.DB, error)

Types

type PostgresConfig

type PostgresConfig struct {
	Address  string
	Port     int
	User     string
	Password string
	Database string
	SslMode  string
}

func (PostgresConfig) ConnectionString

func (c PostgresConfig) ConnectionString() (string, error)

Jump to

Keyboard shortcuts

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