mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-22 10:57:42 +08:00
This patch allows keystores to be configured via the config and plugins. It's completely untested for now, but I started this so I figured I'd get it to a point where we could consider finishing it. License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
25 lines
641 B
Go
25 lines
641 B
Go
package plugin
|
|
|
|
import (
|
|
keystore "github.com/ipfs/go-ipfs/keystore"
|
|
prompt "github.com/ipfs/go-prompt"
|
|
)
|
|
|
|
// PluginKeystore is an interface that can be implemented to new keystore
|
|
// backends.
|
|
type PluginKeystore interface {
|
|
Plugin
|
|
|
|
// KeystoreTypeName returns the the keystore's type. In addition to
|
|
// loading the keystore plugin, the user must configure their go-ipfs
|
|
// node to use the specified keystore backend.
|
|
KeystoreTypeName() string
|
|
|
|
// Open opens the keystore. Prompter may be nil if non-interactive.
|
|
Open(
|
|
repoPath string,
|
|
config map[string]interface{},
|
|
prompter prompt.Prompter,
|
|
) (keystore.Keystore, error)
|
|
}
|