@cryptotaxi247 / kubo / commits / 1208d736c

coreapi/unixfs: Use path instead of raw hash in AddEvent

License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com> This commit was moved from ipfs/interface-go-ipfs-core@a1cf89b78a61aef35a4893f916e14e39cd5c9157 This commit was moved from ipfs/boxo@b5e06d34876da3759fa39fb18f557085e27f76d0

Łukasz Magiera committed Dec 18, 2018 at 14:23 UTC 1208d736c479be0d54acb55028d07cdcd541e2f5
2 files changed +4 -4
core/coreiface/path.go
+1
@@ -46,6 +46,7 @@ type ResolvedPath interface {
46 // cidRoot := {"A": {"/": cidA }}
47 //
48 // And resolve paths:
49 + //
50 // * "/ipfs/${cidRoot}"
51 // * Calling Cid() will return `cidRoot`
52 // * Calling Root() will return `cidRoot`
core/coreiface/unixfs.go
+3 -4
@@ -9,12 +9,11 @@ import (
9 ipld "gx/ipfs/QmcKKBwfz6FyQdHR2jsXrrF6XeSBXYL86anmWNewpFpoF5/go-ipld-format"
10 )
11
12 -// TODO: ideas on making this more coreapi-ish without breaking the http API?
12 type AddEvent struct {
13 Name string
15 - Hash string `json:",omitempty"`
16 - Bytes int64 `json:",omitempty"`
17 - Size string `json:",omitempty"`
14 + Path ResolvedPath `json:",omitempty"`
15 + Bytes int64 `json:",omitempty"`
16 + Size string `json:",omitempty"`
17 }
18
19 // UnixfsAPI is the basic interface to immutable files in IPFS