Documentation ¶
Index ¶
- func ConfigureCmdWithBootstrapConfig(cmd *cobra.Command)
- func FindDockerComposeFile(bootstrap *Bootstrap, fileName string) (string, error)
- func FindFile(fileName string, paths []string) (string, error)
- type Bootstrap
- type ConfigData
- type Environment
- type HappyConfig
- func (s *HappyConfig) App() string
- func (s *HappyConfig) AutoRunMigration() bool
- func (s *HappyConfig) AwsProfile() string
- func (s *HappyConfig) DefaultComposeEnvFile() string
- func (s *HappyConfig) DefaultEnv() string
- func (s *HappyConfig) GetComposeEnvFile() string
- func (s *HappyConfig) GetDockerRepo() string
- func (s *HappyConfig) GetEnv() string
- func (s *HappyConfig) GetProjectRoot() string
- func (s *HappyConfig) GetSecretArn() string
- func (s *HappyConfig) GetServices() []string
- func (s *HappyConfig) GetSlices() (map[string]Slice, error)
- func (s *HappyConfig) GetTasks(taskType string) ([]string, error)
- func (s *HappyConfig) LogGroupPrefix() string
- func (s *HappyConfig) SliceDefaultTag() string
- func (s *HappyConfig) TaskLaunchType() LaunchType
- func (s *HappyConfig) TerraformDirectory() string
- func (s *HappyConfig) TerraformVersion() string
- type IntegrationSecret
- func (s *IntegrationSecret) GetClusterArn() string
- func (s *IntegrationSecret) GetPrivateSubnets() []string
- func (s *IntegrationSecret) GetSecurityGroups() []string
- func (s *IntegrationSecret) GetServiceRegistries() map[string]*RegistryConfig
- func (s *IntegrationSecret) GetServiceUrl(serviceName string) (string, error)
- func (s *IntegrationSecret) GetTfeOrg() string
- func (s *IntegrationSecret) GetTfeUrl() string
- type LaunchType
- type RegistryConfig
- type Slice
- type TfeSecret
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureCmdWithBootstrapConfig ¶ added in v0.3.0
RequireBootstrap wraps a command adding flags to resolve bootstrap configuration. NOTE that these can also be set by the environment and follow a pre-established convention of precedence. NOTE this should typically be called in a cobra commands init sequence.
func FindDockerComposeFile ¶ added in v0.4.0
Types ¶
type Bootstrap ¶ added in v0.3.0
type Bootstrap struct { HappyConfigPath string `envconfig:"HAPPY_CONFIG_PATH" validate:"required"` HappyProjectRoot string `envconfig:"HAPPY_PROJECT_ROOT" validate:"required"` DockerComposeConfigPath string `envconfig:"DOCKER_COMPOSE_CONFIG_PATH" validate:"required"` Env string `envconfig:"HAPPY_ENV" validate:"required"` }
func NewBootstrapConfig ¶ added in v0.3.0
func (*Bootstrap) GetComposeEnvFile ¶ added in v0.4.0
func (*Bootstrap) GetDockerComposeConfigPath ¶ added in v0.3.0
func (*Bootstrap) GetHappyConfigPath ¶ added in v0.3.0
func (*Bootstrap) GetHappyProjectRootPath ¶ added in v0.3.0
type ConfigData ¶
type ConfigData struct { ConfigVersion string `yaml:"config_version"` TerraformVersion string `yaml:"terraform_version"` DefaultEnv string `yaml:"default_env"` App string `yaml:"app"` DefaultComposeEnvFile string `yaml:"default_compose_env_file"` Environments map[string]Environment `yaml:"environments"` Tasks map[string][]string `yaml:"tasks"` SliceDefaultTag string `yaml:"slice_default_tag"` Slices map[string]Slice `yaml:"slices"` Services []string `yaml:"services"` }
type Environment ¶
type Environment struct { AWSProfile string `yaml:"aws_profile"` SecretARN string `yaml:"secret_arn"` TerraformDirectory string `yaml:"terraform_directory"` DeleteProtected bool `yaml:"delete_protected"` AutoRunMigration bool `yaml:"auto_run_migration"` LogGroupPrefix string `yaml:"log_group_prefix"` TaskLaunchType LaunchType `yaml:"task_launch_type"` }
type HappyConfig ¶
type HappyConfig struct {
// contains filtered or unexported fields
}
func NewHappyConfig ¶
func NewHappyConfig(ctx context.Context, bootstrap *Bootstrap) (*HappyConfig, error)
func (*HappyConfig) App ¶
func (s *HappyConfig) App() string
func (*HappyConfig) AutoRunMigration ¶
func (s *HappyConfig) AutoRunMigration() bool
func (*HappyConfig) AwsProfile ¶
func (s *HappyConfig) AwsProfile() string
func (*HappyConfig) DefaultComposeEnvFile ¶ added in v0.4.0
func (s *HappyConfig) DefaultComposeEnvFile() string
func (*HappyConfig) DefaultEnv ¶
func (s *HappyConfig) DefaultEnv() string
func (*HappyConfig) GetComposeEnvFile ¶ added in v0.4.0
func (s *HappyConfig) GetComposeEnvFile() string
func (*HappyConfig) GetDockerRepo ¶ added in v0.3.0
func (s *HappyConfig) GetDockerRepo() string
func (*HappyConfig) GetEnv ¶ added in v0.3.0
func (s *HappyConfig) GetEnv() string
func (*HappyConfig) GetProjectRoot ¶ added in v0.3.0
func (s *HappyConfig) GetProjectRoot() string
func (*HappyConfig) GetSecretArn ¶
func (s *HappyConfig) GetSecretArn() string
func (*HappyConfig) GetServices ¶ added in v0.3.0
func (s *HappyConfig) GetServices() []string
func (*HappyConfig) GetSlices ¶ added in v0.3.0
func (s *HappyConfig) GetSlices() (map[string]Slice, error)
func (*HappyConfig) LogGroupPrefix ¶
func (s *HappyConfig) LogGroupPrefix() string
func (*HappyConfig) SliceDefaultTag ¶ added in v0.3.0
func (s *HappyConfig) SliceDefaultTag() string
func (*HappyConfig) TaskLaunchType ¶ added in v0.3.0
func (s *HappyConfig) TaskLaunchType() LaunchType
func (*HappyConfig) TerraformDirectory ¶
func (s *HappyConfig) TerraformDirectory() string
func (*HappyConfig) TerraformVersion ¶
func (s *HappyConfig) TerraformVersion() string
type IntegrationSecret ¶ added in v0.4.0
type IntegrationSecret struct { ClusterArn string `json:"cluster_arn"` PrivateSubnets []string `json:"private_subnets"` SecurityGroups []string `json:"security_groups"` Services map[string]*RegistryConfig `json:"ecrs"` Tfe *TfeSecret `json:"tfe"` }
func (*IntegrationSecret) GetClusterArn ¶ added in v0.4.0
func (s *IntegrationSecret) GetClusterArn() string
func (*IntegrationSecret) GetPrivateSubnets ¶ added in v0.4.0
func (s *IntegrationSecret) GetPrivateSubnets() []string
func (*IntegrationSecret) GetSecurityGroups ¶ added in v0.4.0
func (s *IntegrationSecret) GetSecurityGroups() []string
func (*IntegrationSecret) GetServiceRegistries ¶ added in v0.4.0
func (s *IntegrationSecret) GetServiceRegistries() map[string]*RegistryConfig
func (*IntegrationSecret) GetServiceUrl ¶ added in v0.4.0
func (s *IntegrationSecret) GetServiceUrl(serviceName string) (string, error)
func (*IntegrationSecret) GetTfeOrg ¶ added in v0.4.0
func (s *IntegrationSecret) GetTfeOrg() string
func (*IntegrationSecret) GetTfeUrl ¶ added in v0.4.0
func (s *IntegrationSecret) GetTfeUrl() string
type LaunchType ¶ added in v0.4.0
type LaunchType string
const ( LaunchTypeFargate LaunchType = "FARGATE" LaunchTypeEC2 LaunchType = "EC2" )
func (LaunchType) String ¶ added in v0.4.0
func (l LaunchType) String() string
type RegistryConfig ¶
type RegistryConfig struct {
Url string `json:"url"`
}
func (*RegistryConfig) GetRegistryUrl ¶
func (s *RegistryConfig) GetRegistryUrl() string
func (*RegistryConfig) GetRepoUrl ¶
func (s *RegistryConfig) GetRepoUrl() string
Click to show internal directories.
Click to hide internal directories.