Documentation
¶
Overview ¶
Package secure provides secure storage capabilities for sensitive data like API keys. It uses the system's native keyring/keychain when available, with fallbacks for different platforms.
Package secure provides secure storage and validation for API keys
Index ¶
Constants ¶
View Source
const ( // ServiceName is the name used to identify this application in the keyring ServiceName = "noidea-git-tool" // FallbackDir is the directory used for fallback storage if keyring is unavailable FallbackDir = ".noidea/secure" // FallbackFile is the filename used for fallback storage FallbackFile = "keyring.enc" )
Variables ¶
View Source
var ErrKeyNotFound = errors.New("key not found in secure storage")
ErrKeyNotFound indicates that a key was not found in the secure storage
Functions ¶
func DeleteAPIKey ¶
DeleteAPIKey removes an API key from secure storage
func GetSecureStorageStatus ¶
GetSecureStorageStatus returns information about the secure storage status
func StoreAPIKey ¶
StoreAPIKey securely stores an API key for a given provider
func ValidateAPIKey ¶
ValidateAPIKey checks if the API key works with the provider
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.