Documentation
¶
Index ¶
- Constants
- func FindEnvironmentFiles(environment string, valueSets []string) ([]string, error)
- func FindEnvironmentFilesInDirectory(environmentsDirectoryPath, environmentName string, valueSets []string) ([]string, error)
- func LoadEnvironmentValues(environment string, valueSets []string) (map[string]string, error)
- func LoadEnvironmentValuesInDirectory(directory, environment string, valueSets []string) (map[string]string, error)
Constants ¶
const CIDirectoryRelativePath = ".environments"
This is the path, relative to the git repo root, where environment directories can be found.
const CommonFileGlob = "common.*"
Glob that matches "common" files which should always be loaded. The values in these files have a lower "preference" than more specific value files.
const EnvironmentNameDirectorySeparator = "/"
Character used to separate directories in an environment name. This must be consistent across multiple platforms.
Variables ¶
This section is empty.
Functions ¶
func FindEnvironmentFiles ¶
Finds environment value files for the given environment and value set, under the "environments" directory in the repo root. File names will be returned in order of priority, with the lowest priority names first.
func FindEnvironmentFilesInDirectory ¶
func FindEnvironmentFilesInDirectory(environmentsDirectoryPath, environmentName string, valueSets []string) ([]string, error)
Finds environment value files for the given environment and value set, under the given directory. File names will be returned in order of priority, with the lowest priority names first. If the environment name includes '/', it is split and each component is searched for common files.
func LoadEnvironmentValues ¶
Finds environment value files for the given environment and value set, under the "environments" directory in the repo root, and loads them. Lower priority files (common files) will have values replaced by values from higher priority files (value set files, last provided being highest priority).
func LoadEnvironmentValuesInDirectory ¶
func LoadEnvironmentValuesInDirectory(directory, environment string, valueSets []string) (map[string]string, error)
Finds environment value files for the given environment and value set, under the given directory, and loads them. Lower priority files (common files) will have values replaced by values from higher priority files (value set files, last provided being highest priority).
Types ¶
This section is empty.