envloader

package
v0.0.0-dev.fred-8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const CIDirectoryRelativePath = ".environments"

This is the path, relative to the git repo root, where environment directories can be found.

View Source
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.

View Source
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

func FindEnvironmentFiles(environment string, valueSets []string) ([]string, error)

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

func LoadEnvironmentValues(environment string, valueSets []string) (map[string]string, error)

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL