Documentation ¶
Index ¶
Constants ¶
const HomeKey = "home"
HomeKey configuration key used for thelma home (path to terra-helmfile clone)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config interface { // Unmarshal will unmarshal all configuration data under the given prefix into the target struct. // // Unmarshal supports use of annotations from the Validator (https://github.com/go-playground/validator) // and Defaults (https://github.com/mcuadros/go-defaults) libraries in structs. Unmarshal(prefix string, into interface{}) error // Dump returns all config values as a map for debugging purposes Dump() map[string]interface{} // Home returns the fully-qualified path to the local terra-helmfile clone Home() string }
Config is the configuration utility for Thelma. See README.md for usage examples.
func Load ¶ added in v0.0.21
Load Thelma configuration from file, environment, etc into a new Config
func NewTestConfig ¶ added in v0.0.21
NewTestConfig is for use in unit tests. It creates a new config object, applying the given settings. By default it sets "home" to the OS temp dir, but this be overridden in the settings map. It DOES NOT include any configuration from the environment or config files (~/.thelma/config.yaml)
type Options ¶ added in v0.0.21
type Options struct { // Overrides overrides to apply to the configuration (useful for testing) Overrides map[string]interface{} // ConfigFile which file to load configuration file from (default ~/.thelma/config.yaml) // Set to "" to skip loading configuration from a file. ConfigFile string // EnvPrefix which prefix to use when loading configuration from environment variables (default "THELMA") // Set to "" to skip loading configuration from environment variables. EnvPrefix string }
Options configure the behavior of config.Load(). This interface is provided to support testing only and shouldn't be used during regular program execution.
func DefaultOptions ¶ added in v0.0.21
func DefaultOptions() Options
DefaultOptions returns default options for Config.Load()