keyring

package
v2.1.1+incompatible Latest Latest
Warning

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

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

Documentation

Overview

+build darwin

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, key string, obj interface{}) error

func Unmarshal

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

Types

type ArrayKeyring

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

func (*ArrayKeyring) Get

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

func (*ArrayKeyring) Keys

func (k *ArrayKeyring) Keys() ([]string, error)

func (*ArrayKeyring) Remove

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

func (*ArrayKeyring) Set

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

type Keyring

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

func ForPlatform

func ForPlatform() (Keyring, error)

type OSXKeychain

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

func (*OSXKeychain) Get

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

func (*OSXKeychain) Keys

func (k *OSXKeychain) Keys() ([]string, error)

func (*OSXKeychain) Remove

func (k *OSXKeychain) Remove(key string) error

func (*OSXKeychain) Set

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

Jump to

Keyboard shortcuts

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