coreapi: smarter way of dealing with the different APIs
License: MIT Signed-off-by: Lars Gierth <larsg@systemli.org> This commit was moved from ipfs/interface-go-ipfs-core@e69000d481d335aef4d610be31750e8558f3b795 This commit was moved from ipfs/boxo@295f1305501eabc7645b7d947d823148c3b0bb56
Lars Gierth committed
Nov 16, 2016 at 06:21 UTC
5bce81d63e222d3ea8a7d3a2e1e4aaba6bb179bd
1 file changed
+4
-5
core/coreiface/interface.go
+4
-5
@@ -9,11 +9,6 @@ import (
9
ipld "gx/ipfs/QmYDscK7dmdo2GZ9aumS8s5auUUAH5mR1jvj5pYhWusfK7/go-ipld-node"
10
)
11
12
-// type CoreAPI interface {
13
-// ID() CoreID
14
-// Version() CoreVersion
15
-// }
16
-
12
type Link ipld.Link
13
14
type Reader interface {
@@ -21,6 +16,10 @@ type Reader interface {
16
io.Closer
17
}
18
19
+type CoreAPI interface {
20
+ Unixfs() UnixfsAPI
21
+}
22
+
23
type UnixfsAPI interface {
24
Add(context.Context, io.Reader) (*cid.Cid, error)
25
Cat(context.Context, string) (Reader, error)