keystore

package
v0.4.5-rc3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrKeyExists = fmt.Errorf("key by that name already exists, refusing to overwrite")
View Source
var ErrNoSuchKey = fmt.Errorf("no key by the given name was found")

Functions

This section is empty.

Types

type FSKeystore

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

func NewFSKeystore

func NewFSKeystore(dir string) (*FSKeystore, error)

func (*FSKeystore) Delete

func (ks *FSKeystore) Delete(name string) error

func (*FSKeystore) Get

func (ks *FSKeystore) Get(name string) (ci.PrivKey, error)

func (*FSKeystore) List

func (ks *FSKeystore) List() ([]string, error)

func (*FSKeystore) Put

func (ks *FSKeystore) Put(name string, k ci.PrivKey) error

type Keystore

type Keystore interface {
	Put(string, ci.PrivKey) error
	Get(string) (ci.PrivKey, error)
	Delete(string) error
	List() ([]string, error)
}

type MemKeystore

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

func NewMemKeystore

func NewMemKeystore() *MemKeystore

func (*MemKeystore) Delete

func (mk *MemKeystore) Delete(name string) error

func (*MemKeystore) Get

func (mk *MemKeystore) Get(name string) (ci.PrivKey, error)

func (*MemKeystore) List

func (mk *MemKeystore) List() ([]string, error)

func (*MemKeystore) Put

func (mk *MemKeystore) Put(name string, k ci.PrivKey) error

Jump to

Keyboard shortcuts

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