Documentation
¶
Index ¶
- type ContainerBuilder
- func (builder *ContainerBuilder) AddContainer(id string, containerInfo ContainerInfo)
- func (builder *ContainerBuilder) AllContainerIDs() []string
- func (builder *ContainerBuilder) FindContainer(containerName string) (*docker.APIContainers, error)
- func (builder *ContainerBuilder) GetContainerInfo(id string) (ContainerInfo, bool)
- func (builder *ContainerBuilder) PruneAll() error
- func (builder *ContainerBuilder) RemoveByID(containerID string) error
- type ContainerInfo
- type ContainerType
- type MongoContainerConnection
- type MongoContainerOptions
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.
Click to show internal directories.
Click to hide internal directories.