Documentation
¶
Overview ¶
Package keyring provides secure credential storage using the OS keychain. It falls back to file-based storage when the keychain is unavailable (e.g., in CI environments).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MockForTesting ¶
func MockForTesting()
MockForTesting replaces the keyring backend with an in-memory store and marks it as available so subsequent New() calls use the mock.
func ResetForTesting ¶ added in v3.35.0
func ResetForTesting()
ResetForTesting resets the availability cache so that the next call to New() re-evaluates the environment. Intended for use in tests only.
Types ¶
type Keyring ¶
type Keyring struct {
// contains filtered or unexported fields
}
Keyring provides secure credential storage with fallback support
func New ¶
func New() *Keyring
New creates a new Keyring instance. It automatically detects if the system keyring is available.
func (*Keyring) IsAvailable ¶
IsAvailable returns true if the system keyring is available