ipfs-cluster/adder/sharding
Hector Sanjuan b6306a6e61 Add endpoints output: improvements and compliance
This straigthens some mistakes with the outputs of the /add endpoints.

Currently, we had exactly the same output format which:

* was not exactly the ipfs API output format but was sort of similar
* made some weird concessions to be compatible (like having a string-type "size")
* was not aligned with Cluster API conventions (lowercase keys)

This corrects all this:

* The Cluster API /add output format now uses the right types and lowercase keys.
* `Hash` is now `Cid`, because the field carries a Cid.
* We copy error handling with request trailers from IPFS, and avoid carrying the
  errors in the output objects.
* The proxy now returns exactly the types as ipfs would
* We add the X-Chunked-Output: 1 header, which is custom and redundant, but
otherwise breaks js-ipfs-api integrations with the /add endpoint.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-04 00:57:36 +02:00
..
dag_service_test.go Add endpoints output: improvements and compliance 2018-10-04 00:57:36 +02:00
dag_service.go Add endpoints output: improvements and compliance 2018-10-04 00:57:36 +02:00
dag.go update go-cid and go-libp2p 2018-09-24 11:35:38 +10:00
shard.go update go-cid and go-libp2p 2018-09-24 11:35:38 +10:00
verify.go update go-cid and go-libp2p 2018-09-24 11:35:38 +10:00