Documentation
¶
Overview ¶
Package secrets resolves the credential references config holds in place of credentials themselves.
A reference is appkit/secret's prefixed form — "env:NAME", "file:/path", or "op://<vault>/<item>/<field>" for 1Password, which this package registers. Config therefore names where a secret lives, never the secret, which is what keeps a dotfiles-managed settings.yaml free of credentials.
References resolve once, at load. A rotated secret needs a relaunch; that is the right trade for a source that may prompt for biometric approval, which nothing should do per request.
Index ¶
Constants ¶
const OnePasswordPrefix = "op"
OnePasswordPrefix is the scheme of a 1Password secret reference, the value 1Password's own UI offers under "Copy Secret Reference".
Variables ¶
var ErrNoOnePassword = errors.New("secrets: the 1Password CLI (op) was not found")
var KnownPrefixes = []string{"env", "file", OnePasswordPrefix}
KnownPrefixes is what a reference may name: appkit/secret's two built-ins plus ours. It is the vocabulary a config error quotes back.
Functions ¶
func HasKnownPrefix ¶
HasKnownPrefix reports whether ref names a source rather than being a literal secret pasted into config.
Types ¶
This section is empty.