keyring

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("keyring: key not found")

ErrNotFound is returned when a key is not found.

Functions

This section is empty.

Types

type Keyring

type Keyring interface {
	Set(key, value string) error
	Get(key string) (string, error)
	Delete(key string) error
}

Keyring abstracts OS keychain operations.

type Mock

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

Mock is an in-memory Keyring implementation for tests.

func NewMock

func NewMock() *Mock

func (*Mock) Delete

func (m *Mock) Delete(key string) error

func (*Mock) Get

func (m *Mock) Get(key string) (string, error)

func (*Mock) Set

func (m *Mock) Set(key, value string) error

type OS

type OS struct{}

OS implements Keyring via zalando/go-keyring.

func (*OS) Delete

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

func (*OS) Get

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

func (*OS) Set

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

Jump to

Keyboard shortcuts

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