Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrKeypairNotFound = errors.New("keypair not found") ErrKeypairAlreadyExists = errors.New("keypair already exists") )
Functions ¶
func RegisterStoreConstructor ¶
func RegisterStoreConstructor(storeType string, constructor StoreConstructor)
RegisterStoreConstructor registers a StoreConstructor of type storeType to be used to create a keystore.
Types ¶
type Keystore ¶
type Keystore interface { // Put puts the provided full keypair into storage. // // ErrKeypairAlreadyExists is returned if a keypair with that id already exists. Put(ctx context.Context, id string, full *keypair.Full) error // Get fetches a keypair by id, if it exists in the store. // // ErrKeypairNotFound is returned if the keypair could not be found in the store. Get(ctx context.Context, id string) (*keypair.Full, error) }
func CreateStore ¶
CreateStore creates a Keystore of type storeType using the StoreConstructor of that type, if one has been registered. If no constructor has been registered with the specified type, an error is thrown
type StoreConstructor ¶
A StoreConstructor creates a Keystore.
Click to show internal directories.
Click to hide internal directories.