keyring

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2015 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrKeyNotFound = errors.New("The specified item could not be found in the keychain.")
View Source
var ErrNoAvailImpl = errors.New("No keyring implementation for your platform available.")

Functions

func Marshal

func Marshal(k Keyring, service, key string, obj interface{}) error

func Unmarshal

func Unmarshal(k Keyring, service, key string, obj interface{}) error

Types

type ArrayKeyring

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

func (*ArrayKeyring) Get

func (k *ArrayKeyring) Get(service, key string) ([]byte, error)

func (*ArrayKeyring) List

func (k *ArrayKeyring) List(service string) ([]string, error)

func (*ArrayKeyring) Remove

func (k *ArrayKeyring) Remove(service, key string) error

func (*ArrayKeyring) Set

func (k *ArrayKeyring) Set(service, key string, secret []byte) error

type Keyring

type Keyring interface {
	Get(service, key string) ([]byte, error)
	Set(service, key string, secret []byte) error
	Remove(service, key string) error
	List(service string) ([]string, error)
}

func DefaultKeyring

func DefaultKeyring() (Keyring, error)

Jump to

Keyboard shortcuts

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