keyring

package module
v0.0.0-...-26e44b8 Latest Latest
Warning

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

Go to latest
Published: May 19, 2020 License: MIT Imports: 5 Imported by: 2

README

This is a deprecated fork.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is the expected error if the secret isn't found in the
	// keyring.
	ErrNotFound = fmt.Errorf("secret not found in keyring")
)
View Source
var ErrUnsupportedPlatform = errors.New("Unsupported platform: " + runtime.GOOS)

All of the following methods error out on unsupported platforms

Functions

func Delete

func Delete(service, user string) error

Delete secret from keyring.

func Get

func Get(service, user string) (string, error)

Get password from keyring given service and user name.

func MockInit

func MockInit()

MockInit sets the provider to a mocked memory store

func Set

func Set(service, user, password string) error

Set password in keyring for user.

Types

type Keyring

type Keyring interface {
	// Set password in keyring for user.
	Set(service, user, password string) error
	// Get password from keyring given service and user name.
	Get(service, user string) (string, error)
	// Delete secret from keyring.
	Delete(service, user string) error
}

Keyring provides a simple set/get interface for a keyring service.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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