Commit e69000d4 authored by Lars Gierth's avatar Lars Gierth

coreapi: smarter way of dealing with the different APIs

License: MIT
Signed-off-by: default avatarLars Gierth <larsg@systemli.org>
parent c7723c40
...@@ -9,11 +9,6 @@ import ( ...@@ -9,11 +9,6 @@ import (
ipld "gx/ipfs/QmYDscK7dmdo2GZ9aumS8s5auUUAH5mR1jvj5pYhWusfK7/go-ipld-node" ipld "gx/ipfs/QmYDscK7dmdo2GZ9aumS8s5auUUAH5mR1jvj5pYhWusfK7/go-ipld-node"
) )
// type CoreAPI interface {
// ID() CoreID
// Version() CoreVersion
// }
type Link ipld.Link type Link ipld.Link
type Reader interface { type Reader interface {
...@@ -21,6 +16,10 @@ type Reader interface { ...@@ -21,6 +16,10 @@ type Reader interface {
io.Closer io.Closer
} }
type CoreAPI interface {
Unixfs() UnixfsAPI
}
type UnixfsAPI interface { type UnixfsAPI interface {
Add(context.Context, io.Reader) (*cid.Cid, error) Add(context.Context, io.Reader) (*cid.Cid, error)
Cat(context.Context, string) (Reader, error) Cat(context.Context, string) (Reader, error)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment