Commit f6916c49 authored by Whyrusleeping's avatar Whyrusleeping Committed by GitHub

Merge pull request #5339 from ipfs/refactor/coreapi/key

 key cmd: Refactor to use coreapi 
parents 896fb83b 814f82cf
......@@ -4,14 +4,20 @@ import (
"context"
options "github.com/ipfs/go-ipfs/core/coreapi/interface/options"
"gx/ipfs/QmdVrMn1LhB4ybb8hMVaMLXnA8XRSewMnK6YqXKXoTcRvN/go-libp2p-peer"
)
// Key specifies the interface to Keys in KeyAPI Keystore
type Key interface {
// Key returns key name
Name() string
// Path returns key path
Path() Path
// ID returns key PeerID
ID() peer.ID
}
// KeyAPI specifies the interface to Keystore
......@@ -28,5 +34,5 @@ type KeyAPI interface {
List(ctx context.Context) ([]Key, error)
// Remove removes keys from keystore. Returns ipns path of the removed key
Remove(ctx context.Context, name string) (Path, error)
Remove(ctx context.Context, name string) (Key, error)
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment