mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-26 21:07:45 +08:00
Merge pull request ipfs/boxoipfs/interface-go-ipfs-core#5339 from ipfs/refactor/coreapi/key
key cmd: Refactor to use coreapi This commit was moved from ipfs/interface-go-ipfs-core@f6916c4970 This commit was moved from ipfs/boxo@d3975b8380
This commit is contained in:
commit
7d3179ff39
@ -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)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user