container

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerBuilder

type ContainerBuilder struct {
	*dockertest.Pool
	// contains filtered or unexported fields
}

func NewContainerBuilder

func NewContainerBuilder(endpoint string) (*ContainerBuilder, error)

NewContainerBuilder creates a new ContainerBuilder instance. The endpoint parameter specifies the Docker endpoint to connect to. can be empty to use the default.

func (*ContainerBuilder) AddContainer

func (builder *ContainerBuilder) AddContainer(id string, containerInfo ContainerInfo)

func (*ContainerBuilder) AllContainerIDs

func (builder *ContainerBuilder) AllContainerIDs() []string

func (*ContainerBuilder) FindContainer

func (builder *ContainerBuilder) FindContainer(containerName string) (*docker.APIContainers, error)

func (*ContainerBuilder) GetContainerInfo

func (builder *ContainerBuilder) GetContainerInfo(id string) (ContainerInfo, bool)

func (*ContainerBuilder) PruneAll

func (builder *ContainerBuilder) PruneAll() error

func (*ContainerBuilder) RemoveByID

func (builder *ContainerBuilder) RemoveByID(containerID string) error

type ContainerInfo

type ContainerInfo struct {
	Name string
	Type ContainerType
}

type ContainerType

type ContainerType string
const (
	ContainerTypeMongoDB ContainerType = "mongodb"
)

type MongoContainerConnection

type MongoContainerConnection struct {
	Host     string
	Port     string
	Username string
	Password string
	Database string
}

func RunMongoContainer

func RunMongoContainer(builder *ContainerBuilder, name string, options MongoContainerConnection) (MongoContainerConnection, error)

RunMongoContainer runs a MongoDB container with the specified options and returns the connection details.

type MongoContainerOptions

type MongoContainerOptions struct {
	Username string
	Password string
	Database string
	Port     string
}

Jump to

Keyboard shortcuts

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