Documentation ¶
Index ¶
- func CreateComponentStackMap(basePath string, filePath string) (map[string]map[string][]string, error)
- func FindComponentDependencies(stack string, componentType string, component string, baseComponent string, ...) ([]string, error)
- func FindComponentStacks(componentType string, component string, baseComponent string, ...) ([]string, error)
- func GetGlobMatches(pattern string) ([]string, error)
- func ProcessConfig(basePath string, stack string, config map[interface{}]interface{}, ...) (map[interface{}]interface{}, error)
- func ProcessYAMLConfigFile(basePath string, filePath string, ...) (map[interface{}]interface{}, map[string]map[interface{}]interface{}, error)
- func ProcessYAMLConfigFiles(basePath string, filePaths []string, processStackDeps bool, ...) ([]string, map[string]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateComponentStackMap ¶
func CreateComponentStackMap(basePath string, filePath string) (map[string]map[string][]string, error)
CreateComponentStackMap accepts a config file and creates a map of component-stack dependencies
func FindComponentDependencies ¶
func FindComponentDependencies( stack string, componentType string, component string, baseComponent string, importsConfig map[string]map[interface{}]interface{}) ([]string, error)
FindComponentDependencies finds all imports where the component or the base component is defined Component depends on the imported config file if any of the following conditions is true: 1. The imported config file has the global `vars` section and it's not empty 2. The imported config file has the component type section, which has a `vars` section which is not empty 3. The imported config file has the "components" section, which has the component type section, which has the component section 4. The imported config file has the "components" section, which has the component type section, which has the base component section
func FindComponentStacks ¶
func FindComponentStacks( componentType string, component string, baseComponent string, componentStackMap map[string]map[string][]string) ([]string, error)
FindComponentStacks finds all infrastructure stack config files where the component or the base component is defined
func GetGlobMatches ¶ added in v1.3.2
GetGlobMatches tries to read and return the Glob matches content from the sync map if it exists in the map, otherwise it finds and returns all files matching the pattern, stores the files in the map and returns the files
func ProcessConfig ¶
func ProcessConfig( basePath string, stack string, config map[interface{}]interface{}, processStackDeps bool, processComponentDeps bool, componentTypeFilter string, componentStackMap map[string]map[string][]string, importsConfig map[string]map[interface{}]interface{}) (map[interface{}]interface{}, error)
ProcessConfig takes a raw stack config, deep-merges all variables, settings, environments and backends, and returns the final stack configuration for all Terraform and helmfile components
func ProcessYAMLConfigFile ¶
func ProcessYAMLConfigFile( basePath string, filePath string, importsConfig map[string]map[interface{}]interface{}) (map[interface{}]interface{}, map[string]map[interface{}]interface{}, error)
ProcessYAMLConfigFile takes a path to a YAML config file, recursively processes and deep-merges all imports, and returns stack config as map[interface{}]interface{}
func ProcessYAMLConfigFiles ¶
func ProcessYAMLConfigFiles( basePath string, filePaths []string, processStackDeps bool, processComponentDeps bool) ([]string, map[string]interface{}, error)
ProcessYAMLConfigFiles takes a list of paths to YAML config files, processes and deep-merges all imports, and returns a list of stack configs
Types ¶
This section is empty.