Skip to content

Commit

Permalink
Merge pull request #3 from web3-storage/fix/missing-allocated-field-t…
Browse files Browse the repository at this point in the history
…o-store-add-response
  • Loading branch information
Alan Shaw authored Jan 4, 2024
2 parents ec78be3 + 1659557 commit faa387c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
12 changes: 10 additions & 2 deletions capability/storeadd/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,19 @@ import (
var ResultSchema []byte

type Success struct {
Status string
With string
// Status of the item to store. A "done" status indicates that it is not
// necessary to upload the item. An "upload" status indicates that the item
// should be uploaded to the provided URL.
Status string
// With is the DID of the space this item will be stored in.
With string
// Link is the CID of the item.
Link ipld.Link
Url *string
Headers *Headers
// Allocated is the total bytes allocated in the space to accommodate this
// stored item. May be zero if the item is _already_ stored in _this_ space.
Allocated uint64
}

type Headers struct {
Expand Down
1 change: 1 addition & 0 deletions capability/storeadd/result.ipldsch
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ type Success struct {
link Link
url optional URL
headers optional {String: String}
allocated Int
}

# type Success union {
Expand Down
2 changes: 1 addition & 1 deletion cmd/w3.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func main() {
&cli.StringFlag{
Name: "space",
Value: "",
Usage: "DID of space to list uploads from.",
Usage: "DID of space to upload to.",
},
&cli.StringFlag{
Name: "proof",
Expand Down

0 comments on commit faa387c

Please sign in to comment.