kubo/core/coreapi/interface/coreapi.go
Łukasz Magiera f218b69e47 coreapi: split the interface into multiple files
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-03-10 18:46:45 +01:00

39 lines
1016 B
Go

// Package iface defines IPFS Core API which is a set of interfaces used to
// interact with IPFS nodes.
package iface
import (
"context"
ipld "gx/ipfs/Qme5bWv7wtjUNGsK2BNGVUFPKiuxWrsqrtvYwCLRw8YFES/go-ipld-format"
)
// CoreAPI defines an unified interface to IPFS for Go programs.
type CoreAPI interface {
// Unixfs returns an implementation of Unixfs API.
Unixfs() UnixfsAPI
// Block returns an implementation of Block API.
Block() BlockAPI
// Dag returns an implementation of Dag API.
Dag() DagAPI
// Name returns an implementation of Name API.
Name() NameAPI
// Key returns an implementation of Key API.
Key() KeyAPI
Pin() PinAPI
// ObjectAPI returns an implementation of Object API
Object() ObjectAPI
// ResolvePath resolves the path using Unixfs resolver
ResolvePath(context.Context, Path) (Path, error)
// ResolveNode resolves the path (if not resolved already) using Unixfs
// resolver, gets and returns the resolved Node
ResolveNode(context.Context, Path) (ipld.Node, error)
}