keychain

package
v0.0.0-...-bd0b5bb Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBackend = errors.New("keychain backend error")

ErrBackend marks any keychain backend failure other than ErrNotFound. Store methods wrap ErrBackend so callers can classify pre-handoff keychain failures via errors.Is (ADR-0001 §6 exit codes).

View Source
var ErrNotFound = errors.New("keychain: item not found")

ErrNotFound is returned by Get when the keychain item does not exist.

Functions

This section is empty.

Types

type Keychain

type Keychain struct{}

Keychain is the production Store backed by the OS keychain via go-keyring.

func (Keychain) Delete

func (Keychain) Delete(ref string) error

func (Keychain) Get

func (Keychain) Get(ref string) (string, error)

func (Keychain) Set

func (Keychain) Set(ref, value string) error

type Store

type Store interface {
	// Get returns the value stored under ref, or ErrNotFound.
	Get(ref string) (string, error)
	// Set stores value under ref.
	Set(ref, value string) error
	// Delete removes ref.
	Delete(ref string) error
}

Store provides access to keychain-stored secrets.

Jump to

Keyboard shortcuts

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