postgres

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: MIT Imports: 6 Imported by: 0

README

Postgres GoDoc Build Status Go Report Card

This package provides a Postgres Box using Conex.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Image to use for the box.
	Image = "postgres:alpine"
	// Port used for connect to postgres server.
	Port = "5432"

	// PostgresUpWaitTime dectiates how long we should wait for post Postgresql to accept connections on {{Port}}.
	PostgresUpWaitTime = 10 * time.Second
)

Functions

func Box

func Box(t testing.TB, config *Config) (*sql.DB, conex.Container)

Box returns an sql.DB connection and the container running the Postgresql instance. It will call t.Fatal on errors.

Types

type Config

type Config struct {
	User     string
	Password string
	Database string // defaults to `postgres` as service db.
	// contains filtered or unexported fields
}

Config used to connect to the database.

Jump to

Keyboard shortcuts

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