postgres

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2020 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildConnectionURI

func BuildConnectionURI(cc Config) string

BuildConnectionURI builds a connection string for lib/pq from Config. If a missing or invalid field is provided, an error is returned.

func RandomDBName added in v0.5.0

func RandomDBName(dbNamePrefix string) string

RandomDBName generates Postgres database names with a common prefix in order to avoid collisions and race conditions in parallel tests

Types

type Config added in v0.4.0

type Config struct {
	Host                  string
	Port                  int
	Username              string
	Password              string
	Database              string
	ApplicationName       string
	ConnectTimeoutSeconds int
	SSLMode               string
}

Config defines Postgres database_sql connection parameters

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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