const ( JujuControllerEnvKey = "JUJU_CONTROLLER" JujuModelEnvKey = "JUJU_MODEL" JujuXDGDataHomeEnvKey = "JUJU_DATA" JujuLoggingConfigEnvKey = "JUJU_LOGGING_CONFIG" JujuFeatureFlagEnvKey = "JUJU_DEV_FEATURE_FLAGS" // JujuStartupLoggingConfigEnvKey if set is used to configure the initial // logging before the command objects are even created to allow debugging // of the command creation and initialisation process. JujuStartupLoggingConfigEnvKey = "JUJU_STARTUP_LOGGING_CONFIG" // Registry key containing juju related information JujuRegistryKey = `HKLM:\SOFTWARE\juju-core` // Registry value where the jujud password resides JujuRegistryPasswordKey = `jujud-password` // TODO(thumper): 2013-09-02 bug 1219630 // As much as I'd like to remove JujuContainerType now, it is still // needed as MAAS still needs it at this stage, and we can't fix // everything at once. JujuContainerTypeEnvKey = "JUJU_CONTAINER_TYPE" // JujuStatusIsoTimeEnvKey is the env var which if true, will cause status // timestamps to be written in RFC3339 format. JujuStatusIsoTimeEnvKey = "JUJU_STATUS_ISO_TIME" // XDGDataHome is a path where data for the running user // should be stored according to the xdg standard. XDGDataHome = "XDG_DATA_HOME" )
FeatureFlags returns a map that can be merged with os.Environ.
Juju1xEnvConfigExists returns true if there is an environments.yaml file in the expected juju 1.x directory.
JujuXDGDataHome returns the current juju home.
JujuXDGDataHomeDir returns the directory where juju should store application-specific files
JujuXDGDataHomePath returns the path to a file in the current juju home.
MergeEnvironment will return the current environment updated with all the values from newValues. If current is nil, a new map is created. If current is not nil, it is mutated.
OldJujuHomeDir returns the directory where juju 1.x stored application-specific files.
SetJujuXDGDataHome sets the value of juju home and returns the current one.