1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-02 02:11:13 +08:00

8 Commits

Author SHA1 Message Date
ee45b8d32f 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>
2017-03-17 03:47:59 +01:00
e260d2fd06 coreapi: smarter way of dealing with the different APIs
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2017-03-17 02:35:17 +01:00
b4eeff2d84 update go-multihash and bubble up deps
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-02-12 12:25:41 -08:00
53d47669da bubble up go-datastore deps
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-11-28 22:29:38 -08:00
396c629301 update to newer ipld node interface with Copy and better Tree
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-11-15 18:00:49 -08:00
f610e19d3e coreapi: reuse go-ipld-node.Link
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-11-07 18:25:49 +01:00
036ca3a764 coreapi: add Add()
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-11-07 18:25:49 +01:00
46239e8215 coreapi: get going, add Cat() and Ls()
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-11-07 18:25:49 +01:00