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 {
Unixfs() UnixfsAPI
Dag() DagAPI
Name() NameAPI
Key() KeyAPI
// ResolvePath resolves the path using Unixfs resolver
ResolvePath(context.Context, Path) (Path, error)
......@@ -102,11 +103,11 @@ type NameAPI interface {
Resolve(ctx context.Context, name string, recursive bool, local bool, nocache bool) (Path, error)
}
type KeyApi interface {
Generate(ctx context.Context, name string, algorithm string, size int) error
type KeyAPI interface {
Generate(ctx context.Context, name string, algorithm string, size int) (string, error)
List(ctx context.Context) (map[string]string, error) //TODO: better key type?
Rename(ctx context.Context, oldName string, newName string) error
Remove(ctx context.Context, name string) error
Rename(ctx context.Context, oldName string, newName string, force bool) (string, bool, error)
Remove(ctx context.Context, name string) (string, error)
}
// 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