Documentation
¶
Overview ¶
Package floci provides a Testcontainers module for Floci — a free, open-source local AWS emulator.
Example:
fc, err := floci.Run(ctx)
if err != nil { ... }
defer fc.Stop(ctx)
cfg, _ := config.LoadDefaultConfig(ctx,
config.WithRegion(fc.GetRegion()),
config.WithBaseEndpoint(fc.GetEndpoint()),
config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider(
fc.GetAccessKey(), fc.GetSecretKey(), "",
)),
)
Index ¶
- Constants
- type AcmConfig
- type ApiGatewayConfig
- type ApiGatewayV2Config
- type AppConfigConfig
- type AppConfigDataConfig
- type AthenaConfig
- type BedrockRuntimeConfig
- type CloudFormationConfig
- type CloudWatchLogsConfig
- type CloudWatchMetricsConfig
- type CodeBuildConfig
- type CodeDeployConfig
- type CognitoConfig
- type DynamoDbConfig
- type Ec2Config
- type EcrConfig
- type EcsConfig
- type EksConfig
- type ElastiCacheConfig
- type ElbV2Config
- type EventBridgeConfig
- type FirehoseConfig
- type FlociContainer
- func (c *FlociContainer) Start(ctx context.Context) (*StartedFlociContainer, error)
- func (c *FlociContainer) WithAccountID(accountID string) *FlociContainer
- func (c *FlociContainer) WithAcmConfig(cfg AcmConfig) *FlociContainer
- func (c *FlociContainer) WithApiGatewayConfig(cfg ApiGatewayConfig) *FlociContainer
- func (c *FlociContainer) WithApiGatewayV2Config(cfg ApiGatewayV2Config) *FlociContainer
- func (c *FlociContainer) WithAppConfigConfig(cfg AppConfigConfig) *FlociContainer
- func (c *FlociContainer) WithAppConfigDataConfig(cfg AppConfigDataConfig) *FlociContainer
- func (c *FlociContainer) WithAthenaConfig(cfg AthenaConfig) *FlociContainer
- func (c *FlociContainer) WithAvailabilityZone(zone string) *FlociContainer
- func (c *FlociContainer) WithBedrockRuntimeConfig(cfg BedrockRuntimeConfig) *FlociContainer
- func (c *FlociContainer) WithCloudFormationConfig(cfg CloudFormationConfig) *FlociContainer
- func (c *FlociContainer) WithCloudWatchLogsConfig(cfg CloudWatchLogsConfig) *FlociContainer
- func (c *FlociContainer) WithCloudWatchMetricsConfig(cfg CloudWatchMetricsConfig) *FlociContainer
- func (c *FlociContainer) WithCodeBuildConfig(cfg CodeBuildConfig) *FlociContainer
- func (c *FlociContainer) WithCodeDeployConfig(cfg CodeDeployConfig) *FlociContainer
- func (c *FlociContainer) WithCognitoConfig(cfg CognitoConfig) *FlociContainer
- func (c *FlociContainer) WithDedicatedNetwork() *FlociContainer
- func (c *FlociContainer) WithDynamoDbConfig(cfg DynamoDbConfig) *FlociContainer
- func (c *FlociContainer) WithEc2Config(cfg Ec2Config) *FlociContainer
- func (c *FlociContainer) WithEcrConfig(cfg EcrConfig) *FlociContainer
- func (c *FlociContainer) WithEcsConfig(cfg EcsConfig) *FlociContainer
- func (c *FlociContainer) WithEksConfig(cfg EksConfig) *FlociContainer
- func (c *FlociContainer) WithElastiCacheConfig(cfg ElastiCacheConfig) *FlociContainer
- func (c *FlociContainer) WithElbV2Config(cfg ElbV2Config) *FlociContainer
- func (c *FlociContainer) WithEventBridgeConfig(cfg EventBridgeConfig) *FlociContainer
- func (c *FlociContainer) WithFirehoseConfig(cfg FirehoseConfig) *FlociContainer
- func (c *FlociContainer) WithGlueConfig(cfg GlueConfig) *FlociContainer
- func (c *FlociContainer) WithIamConfig(cfg IamConfig) *FlociContainer
- func (c *FlociContainer) WithImage(image string) *FlociContainer
- func (c *FlociContainer) WithKinesisConfig(cfg KinesisConfig) *FlociContainer
- func (c *FlociContainer) WithKmsConfig(cfg KmsConfig) *FlociContainer
- func (c *FlociContainer) WithLambdaConfig(cfg LambdaConfig) *FlociContainer
- func (c *FlociContainer) WithMskConfig(cfg MskConfig) *FlociContainer
- func (c *FlociContainer) WithOpenSearchConfig(cfg OpenSearchConfig) *FlociContainer
- func (c *FlociContainer) WithPipesConfig(cfg PipesConfig) *FlociContainer
- func (c *FlociContainer) WithRdsConfig(cfg RdsConfig) *FlociContainer
- func (c *FlociContainer) WithRegion(region string) *FlociContainer
- func (c *FlociContainer) WithResourceGroupsTaggingConfig(cfg ResourceGroupsTaggingConfig) *FlociContainer
- func (c *FlociContainer) WithS3Config(cfg S3Config) *FlociContainer
- func (c *FlociContainer) WithSchedulerConfig(cfg SchedulerConfig) *FlociContainer
- func (c *FlociContainer) WithSecretsManagerConfig(cfg SecretsManagerConfig) *FlociContainer
- func (c *FlociContainer) WithSesConfig(cfg SesConfig) *FlociContainer
- func (c *FlociContainer) WithSesV2Config(cfg SesV2Config) *FlociContainer
- func (c *FlociContainer) WithSnsConfig(cfg SnsConfig) *FlociContainer
- func (c *FlociContainer) WithSqsConfig(cfg SqsConfig) *FlociContainer
- func (c *FlociContainer) WithSsmConfig(cfg SsmConfig) *FlociContainer
- func (c *FlociContainer) WithStepFunctionsConfig(cfg StepFunctionsConfig) *FlociContainer
- type GlueConfig
- type IamConfig
- type KinesisConfig
- type KmsConfig
- type LambdaConfig
- type MskConfig
- type OpenSearchConfig
- type Option
- type PipesConfig
- type RdsConfig
- type ResourceGroupsTaggingConfig
- type S3Config
- type SchedulerConfig
- type SecretsManagerConfig
- type SesConfig
- type SesV2Config
- type SnsConfig
- type SqsConfig
- type SsmConfig
- type StartedFlociContainer
- func (s *StartedFlociContainer) GetAccessKey() string
- func (s *StartedFlociContainer) GetAccountID() string
- func (s *StartedFlociContainer) GetAvailabilityZone() string
- func (s *StartedFlociContainer) GetDedicatedNetworkName() string
- func (s *StartedFlociContainer) GetEndpoint() string
- func (s *StartedFlociContainer) GetMappedPort(ctx context.Context, port int) (int, error)
- func (s *StartedFlociContainer) GetRegion() string
- func (s *StartedFlociContainer) GetSecretKey() string
- func (s *StartedFlociContainer) Stop(ctx context.Context) error
- type StepFunctionsConfig
Constants ¶
const ( DefaultRegion = "us-east-1" DefaultAvailabilityZone = "us-east-1a" DefaultAccountID = "000000000000" DefaultAccessKey = "test" DefaultSecretKey = "test" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcmConfig ¶
AcmConfig configures the ACM (AWS Certificate Manager) service.
func DefaultAcmConfig ¶
func DefaultAcmConfig() AcmConfig
type ApiGatewayConfig ¶
type ApiGatewayConfig struct {
Enabled bool
}
ApiGatewayConfig configures the API Gateway service.
func DefaultApiGatewayConfig ¶
func DefaultApiGatewayConfig() ApiGatewayConfig
type ApiGatewayV2Config ¶
type ApiGatewayV2Config struct {
Enabled bool
}
ApiGatewayV2Config configures the API Gateway V2 service.
func DefaultApiGatewayV2Config ¶
func DefaultApiGatewayV2Config() ApiGatewayV2Config
type AppConfigConfig ¶
type AppConfigConfig struct {
Enabled bool
}
AppConfigConfig configures the AppConfig service.
func DefaultAppConfigConfig ¶
func DefaultAppConfigConfig() AppConfigConfig
type AppConfigDataConfig ¶
type AppConfigDataConfig struct {
Enabled bool
}
AppConfigDataConfig configures the AppConfig Data service.
func DefaultAppConfigDataConfig ¶
func DefaultAppConfigDataConfig() AppConfigDataConfig
type AthenaConfig ¶
AthenaConfig configures the Athena service.
func DefaultAthenaConfig ¶
func DefaultAthenaConfig() AthenaConfig
type BedrockRuntimeConfig ¶
type BedrockRuntimeConfig struct {
Enabled bool
}
BedrockRuntimeConfig configures the Bedrock Runtime service.
func DefaultBedrockRuntimeConfig ¶
func DefaultBedrockRuntimeConfig() BedrockRuntimeConfig
type CloudFormationConfig ¶
type CloudFormationConfig struct {
Enabled bool
}
CloudFormationConfig configures the CloudFormation service.
func DefaultCloudFormationConfig ¶
func DefaultCloudFormationConfig() CloudFormationConfig
type CloudWatchLogsConfig ¶
CloudWatchLogsConfig configures the CloudWatch Logs service.
func DefaultCloudWatchLogsConfig ¶
func DefaultCloudWatchLogsConfig() CloudWatchLogsConfig
type CloudWatchMetricsConfig ¶
type CloudWatchMetricsConfig struct {
Enabled bool
}
CloudWatchMetricsConfig configures the CloudWatch Metrics service.
func DefaultCloudWatchMetricsConfig ¶
func DefaultCloudWatchMetricsConfig() CloudWatchMetricsConfig
type CodeBuildConfig ¶
type CodeBuildConfig struct {
Enabled bool
}
CodeBuildConfig configures the CodeBuild service.
func DefaultCodeBuildConfig ¶
func DefaultCodeBuildConfig() CodeBuildConfig
type CodeDeployConfig ¶
type CodeDeployConfig struct {
Enabled bool
}
CodeDeployConfig configures the CodeDeploy service.
func DefaultCodeDeployConfig ¶
func DefaultCodeDeployConfig() CodeDeployConfig
type CognitoConfig ¶
type CognitoConfig struct {
Enabled bool
}
CognitoConfig configures the Cognito service.
func DefaultCognitoConfig ¶
func DefaultCognitoConfig() CognitoConfig
type DynamoDbConfig ¶
type DynamoDbConfig struct {
Enabled bool
}
DynamoDbConfig configures the DynamoDB service.
func DefaultDynamoDbConfig ¶
func DefaultDynamoDbConfig() DynamoDbConfig
type Ec2Config ¶
Ec2Config configures the EC2 service.
func DefaultEc2Config ¶
func DefaultEc2Config() Ec2Config
type EcrConfig ¶
type EcrConfig struct {
Enabled bool
RegistryImage string
RegistryBasePort int
RegistryPortCount int
// ExposeRegistryPorts publishes ports [RegistryBasePort,
// RegistryBasePort+RegistryPortCount) to the host. Enable it only when the
// registry must be reachable from the host: every published port adds load
// to Docker's port forwarder, and publishing hundreds by default makes
// container startup slow and flaky.
ExposeRegistryPorts bool
}
EcrConfig configures the ECR service. When enabled, ports [RegistryBasePort, RegistryBasePort+RegistryPortCount) are exposed.
func DefaultEcrConfig ¶
func DefaultEcrConfig() EcrConfig
type EcsConfig ¶
EcsConfig configures the ECS service.
func DefaultEcsConfig ¶
func DefaultEcsConfig() EcsConfig
type EksConfig ¶
type EksConfig struct {
Enabled bool
Mock bool
Provider string
DefaultImage string
ApiServerBasePort int
ApiServerPortCount int
// ExposeApiServerPorts publishes ports [ApiServerBasePort,
// ApiServerBasePort+ApiServerPortCount) to the host.
ExposeApiServerPorts bool
}
EksConfig configures the EKS service. Set ExposeApiServerPorts=true to reach cluster API servers from the host.
func DefaultEksConfig ¶
func DefaultEksConfig() EksConfig
type ElastiCacheConfig ¶
type ElastiCacheConfig struct {
Enabled bool
DefaultImage string
ProxyBasePort int
ProxyPortCount int
// ExposeProxyPorts publishes ports [ProxyBasePort,
// ProxyBasePort+ProxyPortCount) to the host.
ExposeProxyPorts bool
}
ElastiCacheConfig configures the ElastiCache service. Set ExposeProxyPorts=true to reach cache proxies from the host.
func DefaultElastiCacheConfig ¶
func DefaultElastiCacheConfig() ElastiCacheConfig
type ElbV2Config ¶
ElbV2Config configures the ELBv2 service.
func DefaultElbV2Config ¶
func DefaultElbV2Config() ElbV2Config
type EventBridgeConfig ¶
type EventBridgeConfig struct {
Enabled bool
}
EventBridgeConfig configures the EventBridge service.
func DefaultEventBridgeConfig ¶
func DefaultEventBridgeConfig() EventBridgeConfig
type FirehoseConfig ¶
type FirehoseConfig struct {
Enabled bool
}
FirehoseConfig configures the Kinesis Data Firehose service.
func DefaultFirehoseConfig ¶
func DefaultFirehoseConfig() FirehoseConfig
type FlociContainer ¶
type FlociContainer struct {
// contains filtered or unexported fields
}
FlociContainer is a builder for a Floci testcontainer.
func NewFlociContainer ¶
func NewFlociContainer() *FlociContainer
NewFlociContainer creates a new FlociContainer builder with default configuration.
func (*FlociContainer) Start ¶
func (c *FlociContainer) Start(ctx context.Context) (*StartedFlociContainer, error)
Start launches the Floci container and waits for it to be ready.
func (*FlociContainer) WithAccountID ¶
func (c *FlociContainer) WithAccountID(accountID string) *FlociContainer
WithAccountID sets the default AWS account ID.
func (*FlociContainer) WithAcmConfig ¶
func (c *FlociContainer) WithAcmConfig(cfg AcmConfig) *FlociContainer
WithAcmConfig applies ACM service configuration.
func (*FlociContainer) WithApiGatewayConfig ¶
func (c *FlociContainer) WithApiGatewayConfig(cfg ApiGatewayConfig) *FlociContainer
WithApiGatewayConfig applies API Gateway service configuration.
func (*FlociContainer) WithApiGatewayV2Config ¶
func (c *FlociContainer) WithApiGatewayV2Config(cfg ApiGatewayV2Config) *FlociContainer
WithApiGatewayV2Config applies API Gateway V2 service configuration.
func (*FlociContainer) WithAppConfigConfig ¶
func (c *FlociContainer) WithAppConfigConfig(cfg AppConfigConfig) *FlociContainer
WithAppConfigConfig applies AppConfig service configuration.
func (*FlociContainer) WithAppConfigDataConfig ¶
func (c *FlociContainer) WithAppConfigDataConfig(cfg AppConfigDataConfig) *FlociContainer
WithAppConfigDataConfig applies AppConfig Data service configuration.
func (*FlociContainer) WithAthenaConfig ¶
func (c *FlociContainer) WithAthenaConfig(cfg AthenaConfig) *FlociContainer
WithAthenaConfig applies Athena service configuration.
func (*FlociContainer) WithAvailabilityZone ¶
func (c *FlociContainer) WithAvailabilityZone(zone string) *FlociContainer
WithAvailabilityZone sets the default availability zone.
func (*FlociContainer) WithBedrockRuntimeConfig ¶
func (c *FlociContainer) WithBedrockRuntimeConfig(cfg BedrockRuntimeConfig) *FlociContainer
WithBedrockRuntimeConfig applies Bedrock Runtime service configuration.
func (*FlociContainer) WithCloudFormationConfig ¶
func (c *FlociContainer) WithCloudFormationConfig(cfg CloudFormationConfig) *FlociContainer
WithCloudFormationConfig applies CloudFormation service configuration.
func (*FlociContainer) WithCloudWatchLogsConfig ¶
func (c *FlociContainer) WithCloudWatchLogsConfig(cfg CloudWatchLogsConfig) *FlociContainer
WithCloudWatchLogsConfig applies CloudWatch Logs service configuration.
func (*FlociContainer) WithCloudWatchMetricsConfig ¶
func (c *FlociContainer) WithCloudWatchMetricsConfig(cfg CloudWatchMetricsConfig) *FlociContainer
WithCloudWatchMetricsConfig applies CloudWatch Metrics service configuration.
func (*FlociContainer) WithCodeBuildConfig ¶
func (c *FlociContainer) WithCodeBuildConfig(cfg CodeBuildConfig) *FlociContainer
WithCodeBuildConfig applies CodeBuild service configuration.
func (*FlociContainer) WithCodeDeployConfig ¶
func (c *FlociContainer) WithCodeDeployConfig(cfg CodeDeployConfig) *FlociContainer
WithCodeDeployConfig applies CodeDeploy service configuration.
func (*FlociContainer) WithCognitoConfig ¶
func (c *FlociContainer) WithCognitoConfig(cfg CognitoConfig) *FlociContainer
WithCognitoConfig applies Cognito service configuration.
func (*FlociContainer) WithDedicatedNetwork ¶
func (c *FlociContainer) WithDedicatedNetwork() *FlociContainer
WithDedicatedNetwork creates a dedicated Docker network for container-based services (Lambda, RDS, ElastiCache, etc.) to communicate with Floci. The network name is generated at Start() time and automatically passed via FLOCI_SERVICES_DOCKER_NETWORK.
func (*FlociContainer) WithDynamoDbConfig ¶
func (c *FlociContainer) WithDynamoDbConfig(cfg DynamoDbConfig) *FlociContainer
WithDynamoDbConfig applies DynamoDB service configuration.
func (*FlociContainer) WithEc2Config ¶
func (c *FlociContainer) WithEc2Config(cfg Ec2Config) *FlociContainer
WithEc2Config applies EC2 service configuration.
func (*FlociContainer) WithEcrConfig ¶
func (c *FlociContainer) WithEcrConfig(cfg EcrConfig) *FlociContainer
WithEcrConfig applies ECR service configuration.
func (*FlociContainer) WithEcsConfig ¶
func (c *FlociContainer) WithEcsConfig(cfg EcsConfig) *FlociContainer
WithEcsConfig applies ECS service configuration.
func (*FlociContainer) WithEksConfig ¶
func (c *FlociContainer) WithEksConfig(cfg EksConfig) *FlociContainer
WithEksConfig applies EKS service configuration.
func (*FlociContainer) WithElastiCacheConfig ¶
func (c *FlociContainer) WithElastiCacheConfig(cfg ElastiCacheConfig) *FlociContainer
WithElastiCacheConfig applies ElastiCache service configuration.
func (*FlociContainer) WithElbV2Config ¶
func (c *FlociContainer) WithElbV2Config(cfg ElbV2Config) *FlociContainer
WithElbV2Config applies ELBv2 service configuration.
func (*FlociContainer) WithEventBridgeConfig ¶
func (c *FlociContainer) WithEventBridgeConfig(cfg EventBridgeConfig) *FlociContainer
WithEventBridgeConfig applies EventBridge service configuration.
func (*FlociContainer) WithFirehoseConfig ¶
func (c *FlociContainer) WithFirehoseConfig(cfg FirehoseConfig) *FlociContainer
WithFirehoseConfig applies Firehose service configuration.
func (*FlociContainer) WithGlueConfig ¶
func (c *FlociContainer) WithGlueConfig(cfg GlueConfig) *FlociContainer
WithGlueConfig applies Glue service configuration.
func (*FlociContainer) WithIamConfig ¶
func (c *FlociContainer) WithIamConfig(cfg IamConfig) *FlociContainer
WithIamConfig applies IAM service configuration.
func (*FlociContainer) WithImage ¶
func (c *FlociContainer) WithImage(image string) *FlociContainer
WithImage overrides the Docker image used for the container.
func (*FlociContainer) WithKinesisConfig ¶
func (c *FlociContainer) WithKinesisConfig(cfg KinesisConfig) *FlociContainer
WithKinesisConfig applies Kinesis service configuration.
func (*FlociContainer) WithKmsConfig ¶
func (c *FlociContainer) WithKmsConfig(cfg KmsConfig) *FlociContainer
WithKmsConfig applies KMS service configuration.
func (*FlociContainer) WithLambdaConfig ¶
func (c *FlociContainer) WithLambdaConfig(cfg LambdaConfig) *FlociContainer
WithLambdaConfig applies Lambda service configuration.
func (*FlociContainer) WithMskConfig ¶
func (c *FlociContainer) WithMskConfig(cfg MskConfig) *FlociContainer
WithMskConfig applies MSK service configuration.
func (*FlociContainer) WithOpenSearchConfig ¶
func (c *FlociContainer) WithOpenSearchConfig(cfg OpenSearchConfig) *FlociContainer
WithOpenSearchConfig applies OpenSearch service configuration.
func (*FlociContainer) WithPipesConfig ¶
func (c *FlociContainer) WithPipesConfig(cfg PipesConfig) *FlociContainer
WithPipesConfig applies Pipes service configuration.
func (*FlociContainer) WithRdsConfig ¶
func (c *FlociContainer) WithRdsConfig(cfg RdsConfig) *FlociContainer
WithRdsConfig applies RDS service configuration.
func (*FlociContainer) WithRegion ¶
func (c *FlociContainer) WithRegion(region string) *FlociContainer
WithRegion sets the default AWS region.
func (*FlociContainer) WithResourceGroupsTaggingConfig ¶
func (c *FlociContainer) WithResourceGroupsTaggingConfig(cfg ResourceGroupsTaggingConfig) *FlociContainer
WithResourceGroupsTaggingConfig applies Resource Groups Tagging service configuration.
func (*FlociContainer) WithS3Config ¶
func (c *FlociContainer) WithS3Config(cfg S3Config) *FlociContainer
WithS3Config applies S3 service configuration.
func (*FlociContainer) WithSchedulerConfig ¶
func (c *FlociContainer) WithSchedulerConfig(cfg SchedulerConfig) *FlociContainer
WithSchedulerConfig applies Scheduler service configuration.
func (*FlociContainer) WithSecretsManagerConfig ¶
func (c *FlociContainer) WithSecretsManagerConfig(cfg SecretsManagerConfig) *FlociContainer
WithSecretsManagerConfig applies Secrets Manager service configuration.
func (*FlociContainer) WithSesConfig ¶
func (c *FlociContainer) WithSesConfig(cfg SesConfig) *FlociContainer
WithSesConfig applies SES service configuration.
func (*FlociContainer) WithSesV2Config ¶
func (c *FlociContainer) WithSesV2Config(cfg SesV2Config) *FlociContainer
WithSesV2Config applies SES V2 service configuration.
func (*FlociContainer) WithSnsConfig ¶
func (c *FlociContainer) WithSnsConfig(cfg SnsConfig) *FlociContainer
WithSnsConfig applies SNS service configuration.
func (*FlociContainer) WithSqsConfig ¶
func (c *FlociContainer) WithSqsConfig(cfg SqsConfig) *FlociContainer
WithSqsConfig applies SQS service configuration.
func (*FlociContainer) WithSsmConfig ¶
func (c *FlociContainer) WithSsmConfig(cfg SsmConfig) *FlociContainer
WithSsmConfig applies SSM service configuration.
func (*FlociContainer) WithStepFunctionsConfig ¶
func (c *FlociContainer) WithStepFunctionsConfig(cfg StepFunctionsConfig) *FlociContainer
WithStepFunctionsConfig applies Step Functions service configuration.
type GlueConfig ¶
type GlueConfig struct {
Enabled bool
}
GlueConfig configures the Glue service.
func DefaultGlueConfig ¶
func DefaultGlueConfig() GlueConfig
type IamConfig ¶
IamConfig configures the IAM service.
func DefaultIamConfig ¶
func DefaultIamConfig() IamConfig
type KinesisConfig ¶
type KinesisConfig struct {
Enabled bool
}
KinesisConfig configures the Kinesis service.
func DefaultKinesisConfig ¶
func DefaultKinesisConfig() KinesisConfig
type KmsConfig ¶
type KmsConfig struct {
Enabled bool
}
KmsConfig configures the KMS service.
func DefaultKmsConfig ¶
func DefaultKmsConfig() KmsConfig
type LambdaConfig ¶
type LambdaConfig struct {
Enabled bool
DefaultMemoryMb int
DefaultTimeoutSeconds int
Ephemeral bool
HotReloadEnabled bool
RuntimeApiBasePort int
RuntimeApiPortCount int
ExposeRuntimePorts bool
DockerNetwork string
}
LambdaConfig configures the Lambda service. Set ExposeRuntimePorts=true and WithDedicatedNetwork() to invoke Lambdas from the host.
func DefaultLambdaConfig ¶
func DefaultLambdaConfig() LambdaConfig
type MskConfig ¶
MskConfig configures the MSK (Managed Streaming for Kafka) service.
func DefaultMskConfig ¶
func DefaultMskConfig() MskConfig
type OpenSearchConfig ¶
type OpenSearchConfig struct {
Enabled bool
Mock bool
DefaultImage string
ProxyBasePort int
ProxyPortCount int
// ExposeProxyPorts publishes ports [ProxyBasePort,
// ProxyBasePort+ProxyPortCount) to the host.
ExposeProxyPorts bool
}
OpenSearchConfig configures the OpenSearch service. Set ExposeProxyPorts=true to reach OpenSearch proxies from the host.
func DefaultOpenSearchConfig ¶
func DefaultOpenSearchConfig() OpenSearchConfig
type Option ¶
type Option func(*FlociContainer)
Option is a functional option for configuring a FlociContainer.
type PipesConfig ¶
type PipesConfig struct {
Enabled bool
}
PipesConfig configures the Pipes service.
func DefaultPipesConfig ¶
func DefaultPipesConfig() PipesConfig
type RdsConfig ¶
type RdsConfig struct {
Enabled bool
ProxyBasePort int
ProxyPortCount int
DefaultPostgresImage string
DefaultMysqlImage string
DefaultMariadbImage string
// ExposeProxyPorts publishes ports [ProxyBasePort,
// ProxyBasePort+ProxyPortCount) to the host.
ExposeProxyPorts bool
}
RdsConfig configures the RDS service. Set ExposeProxyPorts=true for direct DB access from the host.
func DefaultRdsConfig ¶
func DefaultRdsConfig() RdsConfig
type ResourceGroupsTaggingConfig ¶
type ResourceGroupsTaggingConfig struct {
Enabled bool
}
ResourceGroupsTaggingConfig configures the Resource Groups Tagging service.
func DefaultResourceGroupsTaggingConfig ¶
func DefaultResourceGroupsTaggingConfig() ResourceGroupsTaggingConfig
type S3Config ¶
S3Config configures the S3 service.
func DefaultS3Config ¶
func DefaultS3Config() S3Config
type SchedulerConfig ¶
type SchedulerConfig struct {
Enabled bool
}
SchedulerConfig configures the Scheduler service.
func DefaultSchedulerConfig ¶
func DefaultSchedulerConfig() SchedulerConfig
type SecretsManagerConfig ¶
SecretsManagerConfig configures the Secrets Manager service.
func DefaultSecretsManagerConfig ¶
func DefaultSecretsManagerConfig() SecretsManagerConfig
type SesConfig ¶
type SesConfig struct {
Enabled bool
}
SesConfig configures the SES service.
func DefaultSesConfig ¶
func DefaultSesConfig() SesConfig
type SesV2Config ¶
type SesV2Config struct {
Enabled bool
}
SesV2Config configures the SES V2 service.
func DefaultSesV2Config ¶
func DefaultSesV2Config() SesV2Config
type SnsConfig ¶
type SnsConfig struct {
Enabled bool
}
SnsConfig configures the SNS service.
func DefaultSnsConfig ¶
func DefaultSnsConfig() SnsConfig
type SqsConfig ¶
SqsConfig configures the SQS service.
func DefaultSqsConfig ¶
func DefaultSqsConfig() SqsConfig
type SsmConfig ¶
SsmConfig configures the SSM (Systems Manager / Parameter Store) service.
func DefaultSsmConfig ¶
func DefaultSsmConfig() SsmConfig
type StartedFlociContainer ¶
type StartedFlociContainer struct {
// contains filtered or unexported fields
}
StartedFlociContainer is a running Floci container instance.
func Run ¶
func Run(ctx context.Context, opts ...Option) (*StartedFlociContainer, error)
Run creates and starts a Floci container, applying the provided options. It is the recommended entry point for starting Floci in tests.
fc, err := floci.Run(ctx)
fc, err := floci.Run(ctx, func(c *floci.FlociContainer) {
c.WithRegion("eu-west-1")
c.WithS3Config(floci.S3Config{Enabled: true})
})
func (*StartedFlociContainer) GetAccessKey ¶
func (s *StartedFlociContainer) GetAccessKey() string
GetAccessKey returns the AWS access key (always "test").
func (*StartedFlociContainer) GetAccountID ¶
func (s *StartedFlociContainer) GetAccountID() string
GetAccountID returns the configured AWS account ID.
func (*StartedFlociContainer) GetAvailabilityZone ¶
func (s *StartedFlociContainer) GetAvailabilityZone() string
GetAvailabilityZone returns the configured availability zone.
func (*StartedFlociContainer) GetDedicatedNetworkName ¶
func (s *StartedFlociContainer) GetDedicatedNetworkName() string
GetDedicatedNetworkName returns the dedicated Docker network name, or empty string if none.
func (*StartedFlociContainer) GetEndpoint ¶
func (s *StartedFlociContainer) GetEndpoint() string
GetEndpoint returns the HTTP endpoint for Floci (e.g. "http://localhost:32768").
func (*StartedFlociContainer) GetMappedPort ¶
GetMappedPort returns the host-mapped port for a given container port.
func (*StartedFlociContainer) GetRegion ¶
func (s *StartedFlociContainer) GetRegion() string
GetRegion returns the configured AWS region.
func (*StartedFlociContainer) GetSecretKey ¶
func (s *StartedFlociContainer) GetSecretKey() string
GetSecretKey returns the AWS secret key (always "test").
type StepFunctionsConfig ¶
type StepFunctionsConfig struct {
Enabled bool
}
StepFunctionsConfig configures the Step Functions service.
func DefaultStepFunctionsConfig ¶
func DefaultStepFunctionsConfig() StepFunctionsConfig