@cryptotaxi247 / kubo / commits / cb3c58879

coreapi: Keystore API proposal

License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com> This commit was moved from ipfs/interface-go-ipfs-core@4fbdf56dc24b8b7357c0eb06c223093c506c1bbc This commit was moved from ipfs/boxo@286e418f6c66494631d6b570b1ec86396c13e2f0

Łukasz Magiera committed Dec 10, 2017 at 23:48 UTC cb3c588799f563e5597d3855ccff3a10b915c13f
1 file changed +5 -4
core/coreiface/interface.go
+5 -4
@@ -44,6 +44,7 @@ type CoreAPI interface {
44 Unixfs() UnixfsAPI
45 Dag() DagAPI
46 Name() NameAPI
47 + Key() KeyAPI
48
49 // ResolvePath resolves the path using Unixfs resolver
50 ResolvePath(context.Context, Path) (Path, error)
@@ -102,11 +103,11 @@ type NameAPI interface {
103 Resolve(ctx context.Context, name string, recursive bool, local bool, nocache bool) (Path, error)
104 }
105
105 -type KeyApi interface {
106 - Generate(ctx context.Context, name string, algorithm string, size int) error
106 +type KeyAPI interface {
107 + Generate(ctx context.Context, name string, algorithm string, size int) (string, error)
108 List(ctx context.Context) (map[string]string, error) //TODO: better key type?
108 - Rename(ctx context.Context, oldName string, newName string) error
109 - Remove(ctx context.Context, name string) error
109 + Rename(ctx context.Context, oldName string, newName string, force bool) (string, bool, error)
110 + Remove(ctx context.Context, name string) (string, error)
111 }
112
113 // type ObjectAPI interface {