postgres

package
v0.0.0-...-ce2d608 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvAddress  = "ENV_PG_ADDRESS"  // OS env key for PG address
	EnvUsername = "ENV_PG_USERNAME" // OS env key for PG username
	EnvPassword = "ENV_PG_PASSWORD" // OS env key for PG password
	EnvName     = "ENV_PG_NAME"     // OS env key for PG name

	DefaultAddress  = "localhost:5432" // Default value for PG address
	DefaultUsername = "yesoadm"        // Default value for PG username
	DefaultPassword = "Pa@555_w0rd"    // Default value for PG password
	DefaultName     = "yesodb"         // Default value for PG name
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Postgres

type Postgres struct {
	Db *pg.DB
}

Receiver

func New

func New(i Spec) *Postgres

func (*Postgres) CheckConn

func (p *Postgres) CheckConn() error

type Spec

type Spec struct {
	Address  string
	Username string
	Password string
	Name     string
}

Input

Jump to

Keyboard shortcuts

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