keyring

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keyring

type Keyring struct {
	// contains filtered or unexported fields
}

Keyring provides secure storage for sensitive data using the system keyring. It implements the app.SecureStorage interface using generic key-value operations. On macOS it uses Keychain, on Windows it uses Credential Manager, on Linux it uses Secret Service.

func New

func New(env string) *Keyring

New creates a new keyring scoped to the given environment. Migrates credentials from the old service name on first use.

func (*Keyring) Delete

func (k *Keyring) Delete(key string) error

Delete removes a value by key.

func (*Keyring) Get

func (k *Keyring) Get(key string) (string, error)

Get retrieves a value by key. Returns empty string if key doesn't exist.

func (*Keyring) Set

func (k *Keyring) Set(key string, value string) error

Set stores a value by key.

Jump to

Keyboard shortcuts

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