From e4f5db5aa62f7982c2361a80b111d636de4640a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Fri, 3 Aug 2018 16:46:25 +0200 Subject: [PATCH 1/2] coreapi: key: some changes to match command functionality MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit License: MIT Signed-off-by: Łukasz Magiera This commit was moved from ipfs/interface-go-ipfs-core@12537a60f5318fec2fdf2c02a3afd3786b673f07 This commit was moved from ipfs/boxo@f9afe981175685c29705b480a2a68688d14c3a3b --- core/coreiface/key.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/coreiface/key.go b/core/coreiface/key.go index 928aa265f..9e9c7e400 100644 --- a/core/coreiface/key.go +++ b/core/coreiface/key.go @@ -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) } From 16c6be00861e9c59cb66bad9a412a94d61db64a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Tue, 7 Aug 2018 15:10:34 +0200 Subject: [PATCH 2/2] key cmd: fix codeclimate warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit License: MIT Signed-off-by: Łukasz Magiera This commit was moved from ipfs/interface-go-ipfs-core@814f82cf806d4fefc9f5158e85807b4c96751637 This commit was moved from ipfs/boxo@55223e9427daacfa41800357a551aad8bce06ea1 --- core/coreiface/key.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/coreiface/key.go b/core/coreiface/key.go index 9e9c7e400..2abf3559b 100644 --- a/core/coreiface/key.go +++ b/core/coreiface/key.go @@ -16,8 +16,8 @@ type Key interface { // Path returns key path Path() Path - // Id returns key PeerID - Id() peer.ID + // ID returns key PeerID + ID() peer.ID } // KeyAPI specifies the interface to Keystore