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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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