Documentation
¶
Index ¶
- func CachePlanLabel(label string)
- func CachedPlanLabel() string
- func ConfigDir() (string, error)
- func ConfigFilePath() (string, error)
- func DisplayNameForType(t EmulatorType) string
- func FriendlyConfigPath() (string, error)
- func Init() error
- func InitFromPath(path string) error
- func KnownImageRepos() []string
- func KnownImageReposForType(t EmulatorType) []string
- func LicenseFilePath() (string, error)
- func Set(key string, value any) error
- func SetUpdateSkippedVersion(version string) error
- type CLIConfig
- type Config
- type ContainerConfig
- func (c *ContainerConfig) ContainerPort() (string, error)
- func (c *ContainerConfig) DisplayName() string
- func (c *ContainerConfig) HealthPath() (string, error)
- func (c *ContainerConfig) Image() (string, error)
- func (c *ContainerConfig) Name() string
- func (c *ContainerConfig) ProductName() (string, error)
- func (c *ContainerConfig) ResolvedEnv(namedEnvs map[string]map[string]string) ([]string, error)
- func (c *ContainerConfig) Validate() error
- func (c *ContainerConfig) VolumeDir() (string, error)
- type EmulatorType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CachePlanLabel ¶ added in v0.5.7
func CachePlanLabel(label string)
func CachedPlanLabel ¶ added in v0.5.7
func CachedPlanLabel() string
func ConfigFilePath ¶
func DisplayNameForType ¶ added in v0.7.0
func DisplayNameForType(t EmulatorType) string
func FriendlyConfigPath ¶ added in v0.5.7
FriendlyConfigPath returns a human-readable config path: relative for project-local configs, ~-prefixed for paths under $HOME, absolute otherwise.
func InitFromPath ¶ added in v0.3.1
func KnownImageRepos ¶ added in v0.7.0
func KnownImageRepos() []string
func KnownImageReposForType ¶ added in v0.7.0
func KnownImageReposForType(t EmulatorType) []string
func LicenseFilePath ¶ added in v0.5.8
LicenseFilePath returns the path where the license file is cached on the host. This file is written after a successful license validation and mounted read-only into containers so they can activate offline.
func SetUpdateSkippedVersion ¶ added in v0.5.8
Types ¶
type CLIConfig ¶ added in v0.5.8
type CLIConfig struct {
UpdateSkippedVersion string `mapstructure:"update_skipped_version"`
}
type Config ¶
type Config struct {
Containers []ContainerConfig `mapstructure:"containers"`
Env map[string]map[string]string `mapstructure:"env"`
CLI CLIConfig `mapstructure:"cli"`
}
type ContainerConfig ¶
type ContainerConfig struct {
Type EmulatorType `mapstructure:"type"`
Tag string `mapstructure:"tag"`
Port string `mapstructure:"port"`
Volume string `mapstructure:"volume"`
// Env is a list of named environment references defined in the top-level [env.*] config sections.
Env []string `mapstructure:"env"`
}
func (*ContainerConfig) ContainerPort ¶ added in v0.5.0
func (c *ContainerConfig) ContainerPort() (string, error)
func (*ContainerConfig) DisplayName ¶ added in v0.2.0
func (c *ContainerConfig) DisplayName() string
func (*ContainerConfig) HealthPath ¶
func (c *ContainerConfig) HealthPath() (string, error)
func (*ContainerConfig) Image ¶
func (c *ContainerConfig) Image() (string, error)
func (*ContainerConfig) Name ¶
func (c *ContainerConfig) Name() string
Name returns the container name: "localstack-{type}" or "localstack-{type}-{tag}" if tag != latest
func (*ContainerConfig) ProductName ¶
func (c *ContainerConfig) ProductName() (string, error)
func (*ContainerConfig) ResolvedEnv ¶ added in v0.3.1
ResolvedEnv resolves the container's named environment references into KEY=value pairs. namedEnvs is the top-level [env.*] map from Config.
func (*ContainerConfig) Validate ¶ added in v0.5.1
func (c *ContainerConfig) Validate() error
func (*ContainerConfig) VolumeDir ¶ added in v0.5.2
func (c *ContainerConfig) VolumeDir() (string, error)
VolumeDir returns the host directory to mount into the container for persistence/caching. If Volume is set in the config, it is returned as-is. Otherwise, a default is computed from os.UserCacheDir()/lstk/volume/<container-name>.
type EmulatorType ¶
type EmulatorType string
const ( EmulatorAWS EmulatorType = "aws" EmulatorSnowflake EmulatorType = "snowflake" EmulatorAzure EmulatorType = "azure" DefaultAWSPort = "4566" )
func EmulatorTypeForImage ¶ added in v0.7.0
func EmulatorTypeForImage(image string) EmulatorType