envnames

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
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"
)

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

func Deprecated(get Getenv) []string

Deprecated lists, for the legacy spellings present in the environment, "OLD -> NEW" pairs, sorted. Internal variables are left out.

func Get

func Get(get Getenv, name string) string

Get returns the value of a current name: the variable itself when non-empty, else the first non-empty legacy spelling, else "".

func IsSet

func IsSet(lookup func(string) (string, bool), name string) bool

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.

func Legacy

func Legacy(name string) []string

Legacy returns the earlier names of a current one (nil when it has none).

func Names

func Names() []string

Names returns every current name, sorted.

func Source

func Source(get Getenv, name string) (value, from string)

Source is Get that also says which variable supplied the value ("" when none did).

Types

type Getenv

type Getenv func(string) string

Getenv is an environment lookup. nil means os.Getenv.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL