Documentation ¶
Index ¶
- Constants
- func GetDefaultAwsSdkConfig(endpoint string) (aws.Config, error)
- func GetDefaultStaticCredentials() credentials.StaticCredentialsProvider
- func NewConsoleLogger(options ...LoggerOption) (log.GosoLogger, error)
- func NewContainerRunner(config cfg.Config, logger log.Logger) (*containerRunner, error)
- type AutoDetectSettings
- type Component
- type ComponentAddressAware
- type ComponentBaseSettings
- type ComponentBaseSettingsAware
- type ComponentCfgOptionAware
- type ComponentContainerSettings
- type ComponentHealthCheck
- type ComponentOption
- type ComponentShutdownCallback
- type ComponentsConfigManager
- func (m *ComponentsConfigManager) Add(settings interface{}) error
- func (m *ComponentsConfigManager) GetAllSettings() ([]ComponentBaseSettingsAware, error)
- func (m *ComponentsConfigManager) Has(typ string, name string) bool
- func (m *ComponentsConfigManager) HasType(typ string) bool
- func (m *ComponentsConfigManager) List() map[string]map[string]interface{}
- func (m *ComponentsConfigManager) ShouldAutoDetect(typ string) bool
- type ComponentsContainer
- type ConfigOption
- type ContainerBindingSettings
- type DdbComponent
- func (c *DdbComponent) Address() string
- func (c *DdbComponent) CfgOptions() []cfg.Option
- func (c *DdbComponent) Client() *dynamodb.Client
- func (c *DdbComponent) Endpoint() string
- func (c *DdbComponent) Repository(settings *ddb.Settings) (ddb.Repository, error)
- func (c *DdbComponent) SetT(t *testing.T)
- func (c *DdbComponent) Toxiproxy() *toxiproxy.Proxy
- type Environment
- func (e *Environment) Clock() clock.Clock
- func (e *Environment) Component(typ string, name string) Component
- func (e *Environment) Config() cfg.GosoConf
- func (e *Environment) Context() context.Context
- func (e *Environment) DynamoDb(name string) *DdbComponent
- func (e *Environment) Filesystem() *filesystem
- func (e *Environment) LoadFixtureBuilderFactories(factories ...fixtures.FixtureBuilderFactory) error
- func (e *Environment) Localstack(name string) *localstackComponent
- func (e *Environment) Logger() log.GosoLogger
- func (e *Environment) MySql(name string) *mysqlComponent
- func (e *Environment) Redis(name string) *RedisComponent
- func (e *Environment) S3(name string) *S3Component
- func (e *Environment) Stop() error
- func (e *Environment) StreamInput(name string) *StreamInputComponent
- func (e *Environment) StreamOutput(name string) *streamOutputComponent
- func (e *Environment) Wiremock(name string) *wiremockComponent
- type LoggerOption
- type LoggerSettings
- type Option
- func WithComponent(settings ComponentBaseSettingsAware) Option
- func WithConfigEnvKeyReplacer(replacer *strings.Replacer) Option
- func WithConfigFile(file string) Option
- func WithConfigMap(settings map[string]interface{}) Option
- func WithConfigSetting(key string, settings interface{}) Option
- func WithContainerExpireAfter(expireAfter time.Duration) Option
- func WithLoggerLevel(level string) Option
- func WithoutAutoDetectedComponents(components ...string) Option
- type RedisComponent
- type S3Component
- type StreamInputComponent
- func (s *StreamInputComponent) CfgOptions() []cfg.Option
- func (s *StreamInputComponent) Publish(body interface{}, attributes map[string]string)
- func (s *StreamInputComponent) PublishAndStop(body interface{}, attributes map[string]string)
- func (s *StreamInputComponent) PublishFromJsonFile(fileName string)
- func (c *StreamInputComponent) SetT(t *testing.T)
- func (s *StreamInputComponent) Stop()
- type TmpfsSettings
Constants ¶
View Source
const ( DefaultAccessKeyID = "gosoline" DefaultSecretAccessKey = "gosoline" DefaultToken = "" )
View Source
const (
ComponentLocalstack = "localstack"
)
Variables ¶
This section is empty.
Functions ¶
func GetDefaultStaticCredentials ¶
func GetDefaultStaticCredentials() credentials.StaticCredentialsProvider
func NewConsoleLogger ¶
func NewConsoleLogger(options ...LoggerOption) (log.GosoLogger, error)
Types ¶
type AutoDetectSettings ¶
type ComponentAddressAware ¶
type ComponentAddressAware interface {
Address() string
}
type ComponentBaseSettings ¶
type ComponentBaseSettings struct { Name string `cfg:"name" default:"default"` Type string `cfg:"type" validate:"required"` }
func (*ComponentBaseSettings) GetName ¶
func (c *ComponentBaseSettings) GetName() string
func (*ComponentBaseSettings) GetType ¶
func (c *ComponentBaseSettings) GetType() string
func (*ComponentBaseSettings) SetName ¶
func (c *ComponentBaseSettings) SetName(name string)
func (*ComponentBaseSettings) SetType ¶
func (c *ComponentBaseSettings) SetType(typ string)
type ComponentCfgOptionAware ¶
type ComponentContainerSettings ¶
type ComponentContainerSettings struct { ExpireAfter time.Duration `cfg:"expire_after" default:"60s"` Tmpfs []TmpfsSettings `cfg:"tmpfs"` }
type ComponentHealthCheck ¶
type ComponentHealthCheck func(container *container) error
type ComponentOption ¶
type ComponentOption func(componentConfigManger *ComponentsConfigManager) error
type ComponentShutdownCallback ¶
type ComponentShutdownCallback func(container *container) func() error
type ComponentsConfigManager ¶
type ComponentsConfigManager struct {
// contains filtered or unexported fields
}
func NewComponentsConfigManager ¶
func NewComponentsConfigManager(config cfg.GosoConf) *ComponentsConfigManager
func (*ComponentsConfigManager) Add ¶
func (m *ComponentsConfigManager) Add(settings interface{}) error
func (*ComponentsConfigManager) GetAllSettings ¶
func (m *ComponentsConfigManager) GetAllSettings() ([]ComponentBaseSettingsAware, error)
func (*ComponentsConfigManager) Has ¶
func (m *ComponentsConfigManager) Has(typ string, name string) bool
func (*ComponentsConfigManager) HasType ¶
func (m *ComponentsConfigManager) HasType(typ string) bool
func (*ComponentsConfigManager) List ¶
func (m *ComponentsConfigManager) List() map[string]map[string]interface{}
func (*ComponentsConfigManager) ShouldAutoDetect ¶
func (m *ComponentsConfigManager) ShouldAutoDetect(typ string) bool
type ComponentsContainer ¶
type ComponentsContainer struct {
// contains filtered or unexported fields
}
func NewComponentsContainer ¶
func NewComponentsContainer() *ComponentsContainer
func (*ComponentsContainer) Add ¶
func (c *ComponentsContainer) Add(typ string, name string, component Component)
func (*ComponentsContainer) Get ¶
func (c *ComponentsContainer) Get(componentType string, name string) (Component, error)
func (*ComponentsContainer) GetAll ¶
func (c *ComponentsContainer) GetAll() []Component
func (*ComponentsContainer) GetCfgOptions ¶
func (c *ComponentsContainer) GetCfgOptions() []cfg.Option
type ConfigOption ¶
type DdbComponent ¶
type DdbComponent struct {
// contains filtered or unexported fields
}
func (*DdbComponent) Address ¶
func (c *DdbComponent) Address() string
func (*DdbComponent) CfgOptions ¶
func (c *DdbComponent) CfgOptions() []cfg.Option
func (*DdbComponent) Client ¶
func (c *DdbComponent) Client() *dynamodb.Client
func (*DdbComponent) Endpoint ¶
func (c *DdbComponent) Endpoint() string
func (*DdbComponent) Repository ¶
func (c *DdbComponent) Repository(settings *ddb.Settings) (ddb.Repository, error)
func (*DdbComponent) Toxiproxy ¶
func (c *DdbComponent) Toxiproxy() *toxiproxy.Proxy
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
func NewEnvironment ¶
func NewEnvironment(t *testing.T, options ...Option) (*Environment, error)
func (*Environment) Clock ¶
func (e *Environment) Clock() clock.Clock
func (*Environment) Config ¶
func (e *Environment) Config() cfg.GosoConf
func (*Environment) Context ¶
func (e *Environment) Context() context.Context
func (*Environment) DynamoDb ¶
func (e *Environment) DynamoDb(name string) *DdbComponent
func (*Environment) Filesystem ¶
func (e *Environment) Filesystem() *filesystem
func (*Environment) LoadFixtureBuilderFactories ¶
func (e *Environment) LoadFixtureBuilderFactories(factories ...fixtures.FixtureBuilderFactory) error
func (*Environment) Localstack ¶
func (e *Environment) Localstack(name string) *localstackComponent
func (*Environment) Logger ¶
func (e *Environment) Logger() log.GosoLogger
func (*Environment) MySql ¶
func (e *Environment) MySql(name string) *mysqlComponent
func (*Environment) Redis ¶
func (e *Environment) Redis(name string) *RedisComponent
func (*Environment) S3 ¶
func (e *Environment) S3(name string) *S3Component
func (*Environment) Stop ¶
func (e *Environment) Stop() error
func (*Environment) StreamInput ¶
func (e *Environment) StreamInput(name string) *StreamInputComponent
func (*Environment) StreamOutput ¶
func (e *Environment) StreamOutput(name string) *streamOutputComponent
func (*Environment) Wiremock ¶
func (e *Environment) Wiremock(name string) *wiremockComponent
type LoggerOption ¶
type LoggerOption func(settings *LoggerSettings) error
type LoggerSettings ¶
type LoggerSettings struct {
Level string
}
type Option ¶
type Option func(env *Environment)
func WithComponent ¶
func WithComponent(settings ComponentBaseSettingsAware) Option
func WithConfigFile ¶
func WithConfigMap ¶
func WithConfigSetting ¶
func WithLoggerLevel ¶
type RedisComponent ¶
type RedisComponent struct {
// contains filtered or unexported fields
}
func (*RedisComponent) Address ¶
func (c *RedisComponent) Address() string
func (*RedisComponent) CfgOptions ¶
func (c *RedisComponent) CfgOptions() []cfg.Option
func (*RedisComponent) Client ¶
func (c *RedisComponent) Client() *redis.Client
type S3Component ¶
type S3Component struct {
// contains filtered or unexported fields
}
func (*S3Component) CfgOptions ¶
func (c *S3Component) CfgOptions() []cfg.Option
func (*S3Component) Client ¶
func (c *S3Component) Client() *s3.Client
type StreamInputComponent ¶
type StreamInputComponent struct {
// contains filtered or unexported fields
}
func (*StreamInputComponent) CfgOptions ¶
func (s *StreamInputComponent) CfgOptions() []cfg.Option
func (*StreamInputComponent) Publish ¶
func (s *StreamInputComponent) Publish(body interface{}, attributes map[string]string)
func (*StreamInputComponent) PublishAndStop ¶
func (s *StreamInputComponent) PublishAndStop(body interface{}, attributes map[string]string)
func (*StreamInputComponent) PublishFromJsonFile ¶
func (s *StreamInputComponent) PublishFromJsonFile(fileName string)
func (*StreamInputComponent) Stop ¶
func (s *StreamInputComponent) Stop()
type TmpfsSettings ¶
Source Files ¶
- aws.go
- component_ddb.go
- component_localstack.go
- component_mysql.go
- component_redis.go
- component_s3.go
- component_stream_input.go
- component_stream_output.go
- component_wiremock.go
- components.go
- components_config_manager.go
- components_container.go
- container_runner.go
- environment.go
- environment_options.go
- factory_ddb.go
- factory_localstack.go
- factory_mysql.go
- factory_redis.go
- factory_s3.go
- factory_stream_input.go
- factory_stream_output.go
- factory_wiremock.go
- filesystem.go
- logging.go
- toxiproxy.go
Click to show internal directories.
Click to hide internal directories.