Documentation
¶
Index ¶
- type PostgresConfig
- type PostgresContainer
- type RedisConfig
- type RedisContainer
- type TestcontainerAppContainer
- func (t *TestcontainerAppContainer) AddDependency(dep container.Container)
- func (t *TestcontainerAppContainer) ConnectionString() string
- func (t *TestcontainerAppContainer) Dependencies() []container.Container
- func (t *TestcontainerAppContainer) HealthEndpoint() string
- func (t *TestcontainerAppContainer) MetricsEndpoint() string
- func (t *TestcontainerAppContainer) ShutdownEndpoint() string
- func (t *TestcontainerAppContainer) SkeletonConfig() *container.SkeletonConfig
- func (t *TestcontainerAppContainer) Start(ctx context.Context) error
- func (t *TestcontainerAppContainer) Stop(ctx context.Context) error
- func (t *TestcontainerAppContainer) WaitForReady(ctx context.Context, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresConfig ¶
PostgresConfig holds PostgreSQL container configuration
type PostgresContainer ¶
type PostgresContainer struct {
*docker.DockerContainer
// contains filtered or unexported fields
}
PostgresContainer wraps a PostgreSQL container for testing
func NewPostgresContainer ¶
func NewPostgresContainer() *PostgresContainer
NewPostgresContainer creates a new PostgreSQL container with default configuration
func NewPostgresContainerWithConfig ¶
func NewPostgresContainerWithConfig(config *PostgresConfig) *PostgresContainer
NewPostgresContainerWithConfig creates a new PostgreSQL container with custom configuration
func (*PostgresContainer) ConnectionString ¶
func (p *PostgresContainer) ConnectionString() string
ConnectionString returns the PostgreSQL connection string
func (*PostgresContainer) Database ¶
func (p *PostgresContainer) Database() string
Database returns the database name
func (*PostgresContainer) Password ¶
func (p *PostgresContainer) Password() string
Password returns the password
func (*PostgresContainer) Start ¶
func (p *PostgresContainer) Start(ctx context.Context) error
Start starts the PostgreSQL container
func (*PostgresContainer) Username ¶
func (p *PostgresContainer) Username() string
Username returns the username
type RedisConfig ¶
RedisConfig holds Redis container configuration
type RedisContainer ¶
type RedisContainer struct {
*docker.DockerContainer
// contains filtered or unexported fields
}
RedisContainer wraps a Redis container for testing
func NewRedisContainer ¶
func NewRedisContainer() *RedisContainer
NewRedisContainer creates a new Redis container with default configuration
func NewRedisContainerWithConfig ¶
func NewRedisContainerWithConfig(config *RedisConfig) *RedisContainer
NewRedisContainerWithConfig creates a new Redis container with custom configuration
func (*RedisContainer) ConnectionString ¶
func (r *RedisContainer) ConnectionString() string
ConnectionString returns the Redis connection string
func (*RedisContainer) Password ¶
func (r *RedisContainer) Password() string
Password returns the password
type TestcontainerAppContainer ¶
type TestcontainerAppContainer struct {
*docker.DockerContainer
// contains filtered or unexported fields
}
TestcontainerAppContainer extends DockerContainer with skeleton-specific functionality
func NewTestcontainerAppContainer ¶
func NewTestcontainerAppContainer(config *docker.ContainerConfig, skeletonConfig *container.SkeletonConfig) *TestcontainerAppContainer
NewTestcontainerAppContainer creates a new TestcontainerAppContainer
func (*TestcontainerAppContainer) AddDependency ¶
func (t *TestcontainerAppContainer) AddDependency(dep container.Container)
AddDependency adds a container dependency
func (*TestcontainerAppContainer) ConnectionString ¶
func (t *TestcontainerAppContainer) ConnectionString() string
ConnectionString returns a connection string for the container
func (*TestcontainerAppContainer) Dependencies ¶
func (t *TestcontainerAppContainer) Dependencies() []container.Container
Dependencies returns the container dependencies
func (*TestcontainerAppContainer) HealthEndpoint ¶
func (t *TestcontainerAppContainer) HealthEndpoint() string
HealthEndpoint returns the health check endpoint URL
func (*TestcontainerAppContainer) MetricsEndpoint ¶
func (t *TestcontainerAppContainer) MetricsEndpoint() string
MetricsEndpoint returns the metrics endpoint URL
func (*TestcontainerAppContainer) ShutdownEndpoint ¶
func (t *TestcontainerAppContainer) ShutdownEndpoint() string
func (*TestcontainerAppContainer) SkeletonConfig ¶
func (t *TestcontainerAppContainer) SkeletonConfig() *container.SkeletonConfig
SkeletonConfig returns the skeleton configuration
func (*TestcontainerAppContainer) Start ¶
func (t *TestcontainerAppContainer) Start(ctx context.Context) error
Start starts the container and its dependencies
func (*TestcontainerAppContainer) Stop ¶
func (t *TestcontainerAppContainer) Stop(ctx context.Context) error
Stop stops the container
func (*TestcontainerAppContainer) WaitForReady ¶
WaitForReady waits for the container and its dependencies to be ready