Commit 4fbdf56d authored by Łukasz Magiera's avatar Łukasz Magiera

coreapi: Keystore API proposal

License: MIT
Signed-off-by: default avatarŁukasz Magiera <magik6k@gmail.com>
parent 1b5e997c
...@@ -44,6 +44,7 @@ type CoreAPI interface { ...@@ -44,6 +44,7 @@ type CoreAPI interface {
Unixfs() UnixfsAPI Unixfs() UnixfsAPI
Dag() DagAPI Dag() DagAPI
Name() NameAPI Name() NameAPI
Key() KeyAPI
// ResolvePath resolves the path using Unixfs resolver // ResolvePath resolves the path using Unixfs resolver
ResolvePath(context.Context, Path) (Path, error) ResolvePath(context.Context, Path) (Path, error)
...@@ -102,11 +103,11 @@ type NameAPI interface { ...@@ -102,11 +103,11 @@ type NameAPI interface {
Resolve(ctx context.Context, name string, recursive bool, local bool, nocache bool) (Path, error) Resolve(ctx context.Context, name string, recursive bool, local bool, nocache bool) (Path, error)
} }
type KeyApi interface { type KeyAPI interface {
Generate(ctx context.Context, name string, algorithm string, size int) error Generate(ctx context.Context, name string, algorithm string, size int) (string, error)
List(ctx context.Context) (map[string]string, error) //TODO: better key type? List(ctx context.Context) (map[string]string, error) //TODO: better key type?
Rename(ctx context.Context, oldName string, newName string) error Rename(ctx context.Context, oldName string, newName string, force bool) (string, bool, error)
Remove(ctx context.Context, name string) error Remove(ctx context.Context, name string) (string, error)
} }
// type ObjectAPI interface { // type ObjectAPI interface {
......
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