Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Config is the CLI configuration structure Config Configuration // ProcessedConfig holds all the calculated values ProcessedConfig ProcessedConfiguration )
Functions ¶
func InitConfig ¶
func InitConfig(configAndStacksInfo ConfigAndStacksInfo) error
InitConfig processes and merges configurations in the following order: system dir, home dir, current dir, ENV vars, command-line arguments https://dev.to/techschoolguru/load-config-from-file-environment-variables-in-golang-with-viper-2j2d https://medium.com/@bnprashanth256/reading-configuration-files-and-environment-variables-in-go-golang-c2607f912b63
Types ¶
type ArgsAndFlagsInfo ¶
type Components ¶
type ConfigAndStacksInfo ¶
type ConfigAndStacksInfo struct { Stack string ComponentFromArg string ComponentFolderPrefix string ComponentNamePrefix string Component string BaseComponentPath string BaseComponent string Command string SubCommand string ComponentVarsSection map[interface{}]interface{} ComponentBackendSection map[interface{}]interface{} AdditionalArgsAndFlags []string GlobalOptions []string TerraformDir string HelmfileDir string ConfigDir string StacksDir string Context Context ContextPrefix string DeployRunInit string }
type Configuration ¶
type Configuration struct { Components Components Stacks Stacks Logs Logs }
type Helmfile ¶
type Helmfile struct { BasePath string `yaml:"base_path" json:"base_path" mapstructure:"base_path"` KubeconfigPath string `yaml:"kubeconfig_path" json:"kubeconfig_path" mapstructure:"kubeconfig_path"` HelmAwsProfilePattern string `yaml:"helm_aws_profile_pattern" json:"helm_aws_profile_pattern" mapstructure:"helm_aws_profile_pattern"` ClusterNamePattern string `yaml:"cluster_name_pattern" json:"cluster_name_pattern" mapstructure:"cluster_name_pattern"` }
type ProcessedConfiguration ¶
type ProcessedConfiguration struct { StacksBaseAbsolutePath string `yaml:"StacksBaseAbsolutePath" json:"StacksBaseAbsolutePath"` IncludeStackAbsolutePaths []string `yaml:"IncludeStackAbsolutePaths" json:"IncludeStackAbsolutePaths"` ExcludeStackAbsolutePaths []string `yaml:"ExcludeStackAbsolutePaths" json:"ExcludeStackAbsolutePaths"` TerraformDirAbsolutePath string `yaml:"TerraformDirAbsolutePath" json:"TerraformDirAbsolutePath"` HelmfileDirAbsolutePath string `yaml:"HelmfileDirAbsolutePath" json:"HelmfileDirAbsolutePath"` StackConfigFilesRelativePaths []string `yaml:"StackConfigFilesRelativePaths" json:"StackConfigFilesRelativePaths"` StackConfigFilesAbsolutePaths []string `yaml:"StackConfigFilesAbsolutePaths" json:"StackConfigFilesAbsolutePaths"` StackType string `yaml:"StackType" json:"StackType"` }
type Stacks ¶
type Stacks struct { BasePath string `yaml:"base_path" json:"base_path" mapstructure:"base_path"` IncludedPaths []string `yaml:"included_paths" json:"included_paths" mapstructure:"included_paths"` ExcludedPaths []string `yaml:"excluded_paths" json:"excluded_paths" mapstructure:"excluded_paths"` NamePattern string `yaml:"name_pattern" json:"name_pattern" mapstructure:"name_pattern"` }
type Terraform ¶
type Terraform struct { BasePath string `yaml:"base_path" json:"base_path" mapstructure:"base_path"` ApplyAutoApprove bool `yaml:"apply_auto_approve" json:"apply_auto_approve" mapstructure:"apply_auto_approve"` DeployRunInit bool `yaml:"deploy_run_init" json:"deploy_run_init" mapstructure:"deploy_run_init"` }
Click to show internal directories.
Click to hide internal directories.