testdb

package
v3.20.8 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// https://hub.docker.com/_/postgres
	POSTGRES_IMAGE   = "postgres"
	POSTGRES_VERSION = "14-alpine"

	POSTGRES_DB       = "testdb"
	POSTGRES_USER     = "postgres"
	POSTGRES_PASSWORD = "password1"
)

Variables

This section is empty.

Functions

func NewClickHouse

func NewClickHouse(options ...OptionsFunc) (db *pgx.Conn, cleanup func(), err error)

NewClickHouse starts a ClickHouse docker container. Returns db connection and a docker cleanup function.

func NewMariaDB

func NewMariaDB(options ...OptionsFunc) (db *pgx.Conn, cleanup func(), err error)

NewMariaDB starts a MariaDB docker container. Returns a db connection and a docker cleanup function.

func NewPostgres

func NewPostgres(options ...OptionsFunc) (db *pgx.Conn, cleanup func(), err error)

NewPostgres starts a PostgreSQL docker container. Returns db connection and a docker cleanup function.

func NewVertica

func NewVertica(options ...OptionsFunc) (db *pgx.Conn, cleanup func(), err error)

NewVertica starts a Vertica docker container. Returns a db connection and a docker cleanup function.

Types

type OptionsFunc

type OptionsFunc func(o *options)

func WithBindPort

func WithBindPort(n int) OptionsFunc

func WithDebug

func WithDebug(b bool) OptionsFunc

Jump to

Keyboard shortcuts

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