Documentation
¶
Overview ¶
Package envnames is the one table of the environment variables authama reads, under their current AUTHAMA_* names and the names earlier releases used.
The tool shipped as ssh-manager / sshmgr before it was authama, and its variables were SSH_MANAGER_* and SSHMGR_*. Those are still honored - a shell profile or CI job written for an earlier release keeps working - but the AUTHAMA_* name wins when both are set, and the CLI prints a one-line deprecation notice naming the replacement (see Deprecated).
Every read goes through Get or Lookup with the current name, so no call site spells a legacy name and none can forget one.
Index ¶
- Constants
- func AllNames() []string
- func Deprecated(get Getenv) []string
- func Get(get Getenv, name string) string
- func IsSet(lookup func(string) (string, bool), name string) bool
- func Legacy(name string) []string
- func Names() []string
- func Source(get Getenv, name string) (value, from string)
- type Getenv
Constants ¶
const ( ConfigDir = "AUTHAMA_CONFIG_DIR" StateDir = "AUTHAMA_STATE_DIR" DevRoot = "AUTHAMA_DEV_ROOT" NoDotenv = "AUTHAMA_NO_DOTENV" AgeRecipient = "AUTHAMA_AGE_RECIPIENT" AgeIdentityFile = "AUTHAMA_AGE_IDENTITY_FILE" SnapshotRetain = "AUTHAMA_SNAPSHOT_RETAIN" OldKeyMaxAgeDays = "AUTHAMA_OLD_KEY_MAX_AGE_DAYS" AutoPin = "AUTHAMA_AUTO_PIN" History = "AUTHAMA_HISTORY" GitMode = "AUTHAMA_GIT_MODE" TokensConfig = "AUTHAMA_TOKENS_CONFIG" TokensCatalog = "AUTHAMA_TOKENS_CATALOG" DockerCredsStore = "AUTHAMA_DOCKER_CREDS_STORE" Notifications = "AUTHAMA_NOTIFICATIONS" AskpassMode = "AUTHAMA_ASKPASS_MODE" AskpassSecret = "AUTHAMA_ASKPASS_SECRET" VMHypervisors = "AUTHAMA_VM_HYPERVISORS" VMPruneGone = "AUTHAMA_VM_PRUNE_GONE" VMRepin = "AUTHAMA_VM_REPIN" )
The current names. Each constant is the only spelling the code uses.
Variables ¶
This section is empty.
Functions ¶
func AllNames ¶
func AllNames() []string
AllNames returns every name the tool reads, current and legacy, sorted.
func Deprecated ¶
Deprecated lists, for the legacy spellings present in the environment, "OLD -> NEW" pairs, sorted. Internal variables are left out.
func Get ¶
Get returns the value of a current name: the variable itself when non-empty, else the first non-empty legacy spelling, else "".
func IsSet ¶
IsSet reports whether the setting is present in the environment under any of its spellings, even as an empty string. The .env and authama.json loaders use it, so a value a user exported - under either name - is never replaced by one from a file.