database

package
v0.0.0-...-c330695 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// MongoDBVersion defines version to use
	MongoDBVersion = "latest"
)
View Source
var (
	// PostgreSQLVersion defines version to use
	PostgreSQLVersion = "10"
)

Functions

func ConnectToMongoDB

func ConnectToMongoDB(ctx context.Context) (*mongowrapper.WrappedClient, error)

ConnectToMongoDB returns a MongoDB connection

func KillAll

func KillAll(ctx context.Context)

KillAll resources allocated via docker

Types

type Configuration

type Configuration struct {
	ConnectionString string
	DatabaseName     string
	DatabaseUser     string
	Password         string
}

Configuration represents database configuration settings

func ConnectToPostgreSQL

func ConnectToPostgreSQL(_ context.Context) (*sqlx.DB, *Configuration, error)

ConnectToPostgreSQL returns a PostgreSQL connection form a container or a running instance

Jump to

Keyboard shortcuts

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