This repository has been archived by the owner on Jun 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathcoreapi.go
62 lines (44 loc) · 1.6 KB
/
coreapi.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Package iface defines IPFS Core API which is a set of interfaces used to
// interact with IPFS nodes.
package iface
import (
"context"
path "github.com/ipfs/interface-go-ipfs-core/path"
"github.com/ipfs/interface-go-ipfs-core/options"
ipld "github.com/ipfs/go-ipld-format"
)
// CoreAPI defines an unified interface to IPFS for Go programs
//
// Deprecated: use github.com/ipfs/boxo/coreiface.CoreAPI
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() APIDagService
// Name returns an implementation of Name API
Name() NameAPI
// Key returns an implementation of Key API
Key() KeyAPI
// Pin returns an implementation of Pin API
Pin() PinAPI
// Object returns an implementation of Object API
Object() ObjectAPI
// Dht returns an implementation of Dht API
Dht() DhtAPI
// Swarm returns an implementation of Swarm API
Swarm() SwarmAPI
// PubSub returns an implementation of PubSub API
PubSub() PubSubAPI
// Routing returns an implementation of Routing API
Routing() RoutingAPI
// ResolvePath resolves the path using Unixfs resolver
ResolvePath(context.Context, path.Path) (path.Resolved, error)
// ResolveNode resolves the path (if not resolved already) using Unixfs
// resolver, gets and returns the resolved Node
ResolveNode(context.Context, path.Path) (ipld.Node, error)
// WithOptions creates new instance of CoreAPI based on this instance with
// a set of options applied
WithOptions(...options.ApiOption) (CoreAPI, error)
}