mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-27 13:27:50 +08:00
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:
parent
95beda800f
commit
5bce81d63e
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user