Documentation
¶
Overview ¶
Package secret handles credential resolution including OS keyring integration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsKeyringRef ¶
IsKeyringRef reports whether s is a keyring reference.
func Resolve ¶
Resolve resolves a secret value following the order defined in docs/config.md:
- keyring:<service>/<account> → read from the keyring
- otherwise, if plaintext and plaintext is allowed → return as-is
- otherwise → return an error
Note: TTY interactive input is not implemented at this layer (left to the cmd layer).
Types ¶
type KeyringAPI ¶
type KeyringAPI interface {
Get(service, account string) (string, error)
Set(service, account, value string) error
Delete(service, account string) error
}
KeyringAPI is a minimal abstraction over the OS keyring for testability and cross-platform support. service corresponds to the keyring service name; account corresponds to the user/account.
type Options ¶
type Options struct {
AllowPlaintext bool // whether to allow plaintext secrets (default false)
Keyring KeyringAPI // injectable keyring implementation (nil uses default)
}
Options controls secret resolution behavior.
Click to show internal directories.
Click to hide internal directories.