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@a1cf89b78a

This commit was moved from ipfs/boxo@b5e06d3487
This commit is contained in:
Łukasz Magiera 2018-12-18 14:23:55 +01:00
parent cd14497b17
commit 1208d736c4
2 changed files with 4 additions and 4 deletions

View File

@ -46,6 +46,7 @@ type ResolvedPath interface {
// cidRoot := {"A": {"/": cidA }}
//
// And resolve paths:
//
// * "/ipfs/${cidRoot}"
// * Calling Cid() will return `cidRoot`
// * Calling Root() will return `cidRoot`

View File

@ -9,12 +9,11 @@ import (
ipld "gx/ipfs/QmcKKBwfz6FyQdHR2jsXrrF6XeSBXYL86anmWNewpFpoF5/go-ipld-format"
)
// TODO: ideas on making this more coreapi-ish without breaking the http API?
type AddEvent struct {
Name string
Hash string `json:",omitempty"`
Bytes int64 `json:",omitempty"`
Size string `json:",omitempty"`
Path ResolvedPath `json:",omitempty"`
Bytes int64 `json:",omitempty"`
Size string `json:",omitempty"`
}
// UnixfsAPI is the basic interface to immutable files in IPFS