postgres

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package postgres provides setup for spinning up a postgres container.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DSN

func DSN(dbName, dbUser, dbPassword string) string

DSN returns the database dsn for connecting to server.

func Request

func Request(dbName, dbUser, dbPassword string, opts ...testcontainers.GenericContainerOption) testcontainers.StartGenericContainerRequest

Request creates a new request for starting a postgres server.

func RunMigrations

func RunMigrations(migrationSource string) testcontainers.ContainerCallback

RunMigrations is option to run migrations.

func StartGenericContainer

func StartGenericContainer(ctx context.Context, dbName, dbUser, dbPassword string, opts ...testcontainers.GenericContainerOption) (testcontainers.Container, error)

StartGenericContainer starts a new mysql container.

Types

This section is empty.

Jump to

Keyboard shortcuts

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