mongodb

package module
v0.0.0-...-515047e Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: MIT Imports: 5 Imported by: 0

README

MongoDB GoDoc Go Report Card

This package provides a MongoDB box for Conex.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Image to use for the box.
	Image = "mongo:5"
	// Port used for connecting to MongoDB server.
	Port = "27017"

	// MongoUpWaitTime dictates how long we should wait for MongoDB to accept connections on {{Port}}.
	MongoUpWaitTime = 10 * time.Second
)

Functions

func Box

func Box(t testing.TB, config *Config) (*mgo.Session, conex.Container)

Box returns an mgo.Session and the container running the MongoDB instance. It will call t.Fatal on errors.

Types

type Config

type Config struct {
	Database string
	// 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