mirror of
https://github.com/ipfs/kubo.git
synced 2025-08-06 11:31:54 +08:00
coreapi: Keystore API proposal
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user