Class EnvLoader
java.lang.Object
codes.grow.packages.vault.secrets.EnvLoader
Implements
loadEnv (SPEC section 3). Java cannot modify the process environment, so the
default EnvLoader.Target writes system properties; an existing system property or
environment variable of the same name is kept unless override is set.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic StringDerives a variable name: upper-cased, characters outside[A-Z0-9_]become_.static EnvLoader.TargetReturns a target that writes into a map (tests, custom configuration).static EnvLoader.TargetReturns the default target: system properties (existence also checks the environment).
-
Method Details
-
systemProperties
Returns the default target: system properties (existence also checks the environment).- Returns:
- the target
-
map
Returns a target that writes into a map (tests, custom configuration).- Parameters:
map- destination map- Returns:
- the target
-
envName
Derives a variable name: upper-cased, characters outside[A-Z0-9_]become_.- Parameters:
secretName- secret name (relative to the loaded path)prefix- prefix to prepend- Returns:
- the variable name
-