secret

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyringStore

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

KeyringStore implements Store using OS keychain via go-keyring.

func NewKeyringStore

func NewKeyringStore() *KeyringStore

NewKeyringStore creates a KeyringStore with "mcpx" as the service name.

func (*KeyringStore) Delete

func (s *KeyringStore) Delete(name string) error

Delete removes a secret from the OS keychain and updates the keys list.

func (*KeyringStore) Get

func (s *KeyringStore) Get(name string) (string, error)

Get retrieves a secret by name from the OS keychain.

func (*KeyringStore) List

func (s *KeyringStore) List() ([]string, error)

List returns all stored secret names.

func (*KeyringStore) Set

func (s *KeyringStore) Set(name, value string) error

Set stores a secret in the OS keychain and updates the keys list.

type Store

type Store interface {
	Get(name string) (string, error)
	Set(name, value string) error
	Delete(name string) error
	List() ([]string, error)
}

Store interface for secret management.

Jump to

Keyboard shortcuts

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