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@e69000d481

This commit was moved from ipfs/boxo@295f130550
This commit is contained in:
Lars Gierth 2016-11-16 06:21:15 +01:00
parent 95beda800f
commit 5bce81d63e

View File

@ -9,11 +9,6 @@ import (
ipld "gx/ipfs/QmYDscK7dmdo2GZ9aumS8s5auUUAH5mR1jvj5pYhWusfK7/go-ipld-node"
)
// type CoreAPI interface {
// ID() CoreID
// Version() CoreVersion
// }
type Link ipld.Link
type Reader interface {
@ -21,6 +16,10 @@ type Reader interface {
io.Closer
}
type CoreAPI interface {
Unixfs() UnixfsAPI
}
type UnixfsAPI interface {
Add(context.Context, io.Reader) (*cid.Cid, error)
Cat(context.Context, string) (Reader, error)