Documentation
¶
Overview ¶
Package keyring handles secure storage of cryptographic keys.
This mirrors the Python SecretsCLI's CredentialsManager keypair methods. On macOS it uses Keychain, on Windows it uses Credential Manager. On Linux/WSL (where D-Bus Secret Service is typically unavailable), it falls back to file-based storage in ~/.agentsecrets/keyring.json.
Service name: "AgentSecrets" Key naming: "{email}_private_key", "{email}_public_key"
Index ¶
- func DeleteKeypair(email string) error
- func DeleteSecret(projectID, key string) error
- func GetAllProjectSecrets(projectID string) (map[string]string, error)
- func GetPrivateKey(email string) ([]byte, error)
- func GetPublicKey(email string) ([]byte, error)
- func GetSecret(projectID, key string) (string, error)
- func SetSecret(projectID, key, value string) error
- func StoreKeypair(email string, privateKey, publicKey []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteKeypair ¶
DeleteKeypair removes both keys (used during logout).
func DeleteSecret ¶
DeleteSecret removes a secret from the keyring and its index.
func GetAllProjectSecrets ¶
GetAllProjectSecrets returns all secrets mapped for a specific project from the keyring.
func GetPrivateKey ¶
GetPrivateKey retrieves the user's private key.
func GetPublicKey ¶
GetPublicKey retrieves the user's public key.
func SetSecret ¶
SetSecret stores a decrypted secret in the keyring and updates the project's key index.
func StoreKeypair ¶
StoreKeypair saves both private and public keys. Uses OS keychain when available, falls back to file on Linux/WSL.
Types ¶
This section is empty.