keychain

package
v1.8.12 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package keychain implements a native secure password store for each platform.

Index

Constants

View Source
const (
	Pass         = "pass-app"
	GnomeKeyring = "gnome-keyring"
)
View Source
const Version = "k11"

Version is the keychain data version.

Variables

View Source
var (
	// ErrNoKeychain indicates that no suitable keychain implementation could be loaded.
	ErrNoKeychain = errors.New("no keychain") // nolint[noglobals]

	// Helpers holds all discovered keychain helpers. It is populated in init().
	Helpers map[string]helperConstructor // nolint[noglobals]

)

Functions

This section is empty.

Types

type Keychain added in v1.6.3

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

func NewKeychain added in v1.6.3

func NewKeychain(s *settings.Settings, keychainName string) (*Keychain, error)

NewKeychain creates a new native keychain.

func NewMissingKeychain added in v1.6.3

func NewMissingKeychain() *Keychain

NewMissingKeychain returns a new keychain that always returns an error.

func (*Keychain) Delete added in v1.6.3

func (kc *Keychain) Delete(userID string) error

func (*Keychain) Get added in v1.6.3

func (kc *Keychain) Get(userID string) (string, string, error)

Get returns the username and secret for the given userID.

func (*Keychain) List added in v1.6.3

func (kc *Keychain) List() ([]string, error)

func (*Keychain) Put added in v1.6.3

func (kc *Keychain) Put(userID, secret string) error

Jump to

Keyboard shortcuts

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