Documentation ¶
Index ¶
- type BySource
- type DetailedMap
- type EnvironmentVariableMap
- func (evm EnvironmentVariableMap) Add(key string, value string)
- func (evm EnvironmentVariableMap) Difference(another EnvironmentVariableMap)
- func (evm EnvironmentVariableMap) FromWildcards(wildcardPatterns []string) (EnvironmentVariableMap, error)
- func (evm EnvironmentVariableMap) FromWildcardsUnresolved(wildcardPatterns []string) (WildcardMaps, error)
- func (evm EnvironmentVariableMap) Names() []string
- func (evm EnvironmentVariableMap) ToHashable() EnvironmentVariablePairs
- func (evm EnvironmentVariableMap) ToSecretHashable() EnvironmentVariablePairs
- func (evm EnvironmentVariableMap) Union(another EnvironmentVariableMap)
- type EnvironmentVariablePairs
- type WildcardMaps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BySource ¶
type BySource struct { Explicit EnvironmentVariableMap Matching EnvironmentVariableMap }
BySource contains a map of environment variables broken down by the source
type DetailedMap ¶
type DetailedMap struct { All EnvironmentVariableMap BySource BySource }
DetailedMap contains the composite and the detailed maps of environment variables All is used as a taskhash input (taskhash.CalculateTaskHash) BySource is used to print out a Dry Run Summary
type EnvironmentVariableMap ¶
EnvironmentVariableMap is a map of env variables and their values
func GetEnvMap ¶
func GetEnvMap() EnvironmentVariableMap
GetEnvMap returns a map of env vars and their values from os.Environ
func (EnvironmentVariableMap) Add ¶
func (evm EnvironmentVariableMap) Add(key string, value string)
Add creates one new environment variable.
func (EnvironmentVariableMap) Difference ¶
func (evm EnvironmentVariableMap) Difference(another EnvironmentVariableMap)
Difference takes another EnvironmentVariableMap and removes matching keys from the receiver
func (EnvironmentVariableMap) FromWildcards ¶
func (evm EnvironmentVariableMap) FromWildcards(wildcardPatterns []string) (EnvironmentVariableMap, error)
FromWildcards returns an EnvironmentVariableMap containing the variables in the environment which match an array of wildcard patterns.
func (EnvironmentVariableMap) FromWildcardsUnresolved ¶
func (evm EnvironmentVariableMap) FromWildcardsUnresolved(wildcardPatterns []string) (WildcardMaps, error)
FromWildcardsUnresolved returns a wildcardSet specifying the inclusions and exclusions discovered from a set of wildcard patterns. This is used to ensure that user exclusions have primacy over inferred inclusions.
func (EnvironmentVariableMap) Names ¶
func (evm EnvironmentVariableMap) Names() []string
Names returns a sorted list of env var names for the EnvironmentVariableMap
func (EnvironmentVariableMap) ToHashable ¶
func (evm EnvironmentVariableMap) ToHashable() EnvironmentVariablePairs
ToHashable returns a deterministically sorted set of EnvironmentVariablePairs from an EnvironmentVariableMap This is the value that is used upstream as a task hash input, so we need it to be deterministic
func (EnvironmentVariableMap) ToSecretHashable ¶
func (evm EnvironmentVariableMap) ToSecretHashable() EnvironmentVariablePairs
ToSecretHashable returns a deterministically sorted set of EnvironmentVariablePairs from an EnvironmentVariableMap This is the value used to print out the task hash input, so the values are cryptographically hashed
func (EnvironmentVariableMap) Union ¶
func (evm EnvironmentVariableMap) Union(another EnvironmentVariableMap)
Union takes another EnvironmentVariableMap and adds it into the receiver It overwrites values if they already exist.
type EnvironmentVariablePairs ¶
type EnvironmentVariablePairs []string
EnvironmentVariablePairs is a list of "k=v" strings for env variables and their values
type WildcardMaps ¶
type WildcardMaps struct { Inclusions EnvironmentVariableMap Exclusions EnvironmentVariableMap }
WildcardMaps is a pair of EnvironmentVariableMaps.
func (WildcardMaps) Resolve ¶
func (ws WildcardMaps) Resolve() EnvironmentVariableMap
Resolve collapses a WildcardSet into a single EnvironmentVariableMap.