Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("keystore: key not found")
ErrNotFound is returned when the key does not exist.
Functions ¶
This section is empty.
Types ¶
type KeyName ¶
type KeyName string
KeyName represents private key name.
func KeyNameFromBase32 ¶
KeyNameFromBase32 decodes KeyName from Base32 format.
type Keystore ¶
type Keystore interface {
// Put stores given PrivKey.
Put(KeyName, PrivKey) error
// Get reads PrivKey using given KeyName.
Get(KeyName) (PrivKey, error)
// Delete erases PrivKey using given KeyName.
Delete(name KeyName) error
// List lists all stored key names.
List() ([]KeyName, error)
// Path reports the path of the Keystore.
Path() string
// Keyring returns the keyring corresponding to the node's
// keystore.
Keyring() keyring.Keyring
}
Keystore is meant to manage private keys.
func NewFSKeystore ¶
NewFSKeystore creates a new Keystore over OS filesystem. The path must point to a directory. It is created automatically if necessary.
Click to show internal directories.
Click to hide internal directories.