keyring

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 8 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteKeypair

func DeleteKeypair(email string) error

DeleteKeypair removes both keys (used during logout).

func DeleteSecret

func DeleteSecret(projectID, key string) error

DeleteSecret removes a secret from the keyring and its index.

func GetAllProjectSecrets

func GetAllProjectSecrets(projectID string) (map[string]string, error)

GetAllProjectSecrets returns all secrets mapped for a specific project from the keyring.

func GetPrivateKey

func GetPrivateKey(email string) ([]byte, error)

GetPrivateKey retrieves the user's private key.

func GetPublicKey

func GetPublicKey(email string) ([]byte, error)

GetPublicKey retrieves the user's public key.

func GetSecret

func GetSecret(projectID, key string) (string, error)

GetSecret retrieves a secret from the keyring.

func SetSecret

func SetSecret(projectID, key, value string) error

SetSecret stores a decrypted secret in the keyring and updates the project's key index.

func StoreKeypair

func StoreKeypair(email string, privateKey, publicKey []byte) error

StoreKeypair saves both private and public keys. Uses OS keychain when available, falls back to file on Linux/WSL.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL