Commit Graph

9 Commits

Author SHA1 Message Date
Jeromy
393471674c bubble up updates from go-multihash changes
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>


This commit was moved from ipfs/interface-go-ipfs-core@be73d10538

This commit was moved from ipfs/boxo@dcecd3345b
2017-04-20 20:28:04 +02:00
Lars Gierth
1c53ef3f98 coreapi: make the interfaces path centric
The new coreiface.Path maps a path to the cid.Cid
resulting from a full path resolution.

The path is internally represented as a go-ipfs/path.Path,
but that doesn't matter to the outside.

Apart from the path-to-CID mapping, it also aims to hold all
resolved segment CIDs of the path. Right now it only exposes
Root(), and only for flat paths a la /ipfs/Qmfoo. In other cases,
the root is nil.

In the future, resolution will internally use
go-ipfs/path.Resolver.ResolvePathComponents and thus always return
the proper resolved segments, via Root(), or a future Segments() func.

- Add coreiface.Path with Cid() and Root().
- Add CoreAPI.ResolvePath() for getting a coreiface.Path.
- All functions now expect and return coreiface.Path.
- Add ParsePath() and ParseCid() for constructing a coreiface.Path.
- Add coreiface.Node and Link which are simply go-ipld-node.Node and Link.
- Add CoreAPI.ResolveNode() for getting a Node from a Path.

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>


This commit was moved from ipfs/interface-go-ipfs-core@66af039105

This commit was moved from ipfs/boxo@61e07c830c
2017-03-17 03:47:59 +01:00
Lars Gierth
5bce81d63e 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
2017-03-17 02:35:17 +01:00
Jeromy
95beda800f update go-multihash and bubble up deps
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>


This commit was moved from ipfs/interface-go-ipfs-core@c7723c40fe

This commit was moved from ipfs/boxo@c8a57ca4e3
2017-02-12 12:25:41 -08:00
Jeromy
88ba95d954 bubble up go-datastore deps
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>


This commit was moved from ipfs/interface-go-ipfs-core@3f68a10d21

This commit was moved from ipfs/boxo@da6ace83a4
2016-11-28 22:29:38 -08:00
Jeromy
10bf6e9171 update to newer ipld node interface with Copy and better Tree
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>


This commit was moved from ipfs/interface-go-ipfs-core@23f95c6d1e

This commit was moved from ipfs/boxo@4f28fc7772
2016-11-15 18:00:49 -08:00
Lars Gierth
a3fb17377b coreapi: reuse go-ipld-node.Link
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>


This commit was moved from ipfs/interface-go-ipfs-core@c34bbcac7c

This commit was moved from ipfs/boxo@54a9bc5374
2016-11-07 18:25:49 +01:00
Lars Gierth
a4a55e7799 coreapi: add Add()
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>


This commit was moved from ipfs/interface-go-ipfs-core@87e9bc0419

This commit was moved from ipfs/boxo@b83c5e3fc3
2016-11-07 18:25:49 +01:00
Lars Gierth
1e57383685 coreapi: get going, add Cat() and Ls()
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>


This commit was moved from ipfs/interface-go-ipfs-core@d6cc518f50

This commit was moved from ipfs/boxo@9a989442e7
2016-11-07 18:25:49 +01:00