Documentation ¶
Index ¶
- func ExportEnv(w io.Writer, values map[string]string)
- func ExportQuiet(w io.Writer, values map[string]string)
- func ExtractEnv(secrets map[string]interface{}) (map[string]string, error)
- func IsEnvError(err error) bool
- func ReadAndExportEnv(filename, keyDir, privateKey string, exportFunc ExportFunction) error
- func ReadAndExtractEnv(filename, keyDir, privateKey string) (map[string]string, error)
- type ExportFunction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportQuiet ¶
ExportQuiet writes the passed environment values to the passed io.Writer in %s=%s format.
func ExtractEnv ¶
ExtractEnv extracts the environment values from the map[string]interface{} containing all secrets, and returns a map[string]string containing the key value pairs. If there's an issue (the environment key doesn't exist, for example), returns an error.
func IsEnvError ¶
IsEnvError returns true if the passed error is due to the environment being missing or not containing environment variables.
func ReadAndExportEnv ¶
func ReadAndExportEnv(filename, keyDir, privateKey string, exportFunc ExportFunction) error
ReadAndExportEnv wraps the read, extract, and export steps. Returns an error if any step fails.
Types ¶
Click to show internal directories.
Click to hide internal directories.