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>
| 名称 |
最后提交
|
最后更新 |
|---|---|---|
| .. | ||
| commands.go | 正在载入提交数据... | |
| corehttp.go | 正在载入提交数据... | |
| gateway.go | 正在载入提交数据... | |
| gateway_handler.go | 正在载入提交数据... | |
| gateway_indexPage.go | 正在载入提交数据... | |
| gateway_test.go | 正在载入提交数据... | |
| ipns_hostname.go | 正在载入提交数据... | |
| logs.go | 正在载入提交数据... | |
| metrics.go | 正在载入提交数据... | |
| metrics_test.go | 正在载入提交数据... | |
| redirect.go | 正在载入提交数据... | |
| webui.go | 正在载入提交数据... |