mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-27 21:37:57 +08:00
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:
parent
cd14497b17
commit
1208d736c4
@ -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`
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user