Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #5339 from ipfs/refactor/coreapi/key
Browse files Browse the repository at this point in the history
 key cmd: Refactor to use coreapi
  • Loading branch information
whyrusleeping authored Aug 7, 2018
2 parents 896fb83 + 814f82c commit f6916c4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion key.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
}

0 comments on commit f6916c4

Please sign in to comment.