keyring

package
v0.7.61 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// SourceKeychain is the source label used when a value comes from the system keychain.
	SourceKeychain = "System keychain"
)

Variables

View Source
var ErrNotFound = errors.New("credential not found in keychain")

ErrNotFound is returned by Get when no credential is stored or the keyring is unavailable.

Functions

func Delete

func Delete(service string) error

Delete removes a credential. Returns nil if not present.

func Get

func Get(service string) (string, error)

Get retrieves a credential. Returns ErrNotFound if absent or keyring unavailable.

func ServiceAnthropic

func ServiceAnthropic(baseURL string) string

ServiceAnthropic returns the keychain service key for the given Anthropic base URL.

func ServiceCircleCI

func ServiceCircleCI(baseURL string) string

ServiceCircleCI returns the keychain service key for the given CircleCI base URL.

func ServiceGitHub

func ServiceGitHub(baseURL string) string

ServiceGitHub returns the keychain service key for the given GitHub API URL.

func Set

func Set(service, secret string) error

Set stores a credential in the system keychain.

Types

This section is empty.

Jump to

Keyboard shortcuts

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