b6306a6e61
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> |
||
---|---|---|
.. | ||
.travis.yml | ||
client_test.go | ||
client.go | ||
methods_test.go | ||
methods.go | ||
README.md | ||
request.go | ||
transports.go |
ipfs-cluster client
Go client for ipfs-cluster HTTP API.
This is a Go client library to use the ipfs-cluster REST HTTP API.
Table of Contents
Install
You can import github.com/ipfs/ipfs-cluster/api/rest/client
in your code. If you wish to use gx
for dependency management, it can be imported with:
$ gx import github.com/ipfs/ipfs-cluster/
The code can be downloaded and tested with:
$ go get -u -d github.com/ipfs/ipfs-cluster
$ cd $GOPATH/src/github.com/ipfs/ipfs-cluster/rest/api/client
$ go test -v
Usage
Documentation can be read at Godoc.
Contribute
PRs accepted.
License
MIT © Protocol Labs