Documentation ¶
Index ¶
- type Container
- func (c *Container) DotNetConnectionString(ctx context.Context) (string, error)
- func (c *Container) DotNetConnectionStringForNetwork(ctx context.Context, network string) (string, error)
- func (c Container) GetLogs(ctx context.Context) (string, error)
- func (c *Container) GoConnectionString(ctx context.Context) (string, error)
- func (c Container) HostAndPort(ctx context.Context) (string, nat.Port, error)
- func (c Container) Shutdown(ctx context.Context) error
- type ContainerRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { Container testcontainers.Container // contains filtered or unexported fields }
Container represents a mock-server container
func CreateContainer ¶
func CreateContainer(ctx context.Context, req ContainerRequest) (*Container, error)
CreateContainer creates a SQL Server for Linux container
func (*Container) DotNetConnectionString ¶ added in v0.0.16
DotNetConnectionString returns a connection string suitable for usage in .NET
func (*Container) DotNetConnectionStringForNetwork ¶
func (c *Container) DotNetConnectionStringForNetwork(ctx context.Context, network string) (string, error)
DotNetConnectionStringForNetwork returns a connection string suitable for usage in .NET for a containter in the same network
func (*Container) GoConnectionString ¶
GoConnectionString returns a connection string suitable for usage in Go
func (Container) HostAndPort ¶ added in v0.0.17
HostAndPort retrieves the external host and port of the container
type ContainerRequest ¶
type ContainerRequest struct { testcontainers.GenericContainerRequest Username string Password string Image string Logger *testcontainers.LogConsumer }
ContainerRequest a container request specification
func (ContainerRequest) WithNetworkAlias ¶
func (req ContainerRequest) WithNetworkAlias(network, alias string) ContainerRequest
WithNetworkAlias adds a network alias to the container request
Click to show internal directories.
Click to hide internal directories.