ipfs-cluster/api/rest/client
Hector Sanjuan 0a8edc17c9 Fix #260: Add REST API client and use it in ipfs-cluster-ctl
This adds the pakage api/rest/client which implements a go-client
for the REST API component. It also update the ipfs-cluster-ctl
tool to rely on it.

Originally, I wanted this to live it in it's own separate repository,
but the api client uses /api/types.go, which is part of cluster.

Therefore it would need to import all of cluster as a dependency.
ipfs-cluster-ctl would also need to import go-ipfs-cluster-api-client
as a dependency, creating circular gx deps which would be a mess to
maintain.

Only the splitting of cluster in multiple repositories (at least for
api, rest, ipfs-cluster-ctl, rest/client and test) would allow better
dependency management by allowing rest/client and the ctl tool
to only import what is needed, but this is something which brings
maintenance costs and can probably wait a bit until cluster is more stable.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2017-12-06 20:12:01 +01:00
..
.travis.yml Fix #260: Add REST API client and use it in ipfs-cluster-ctl 2017-12-06 20:12:01 +01:00
client_test.go Fix #260: Add REST API client and use it in ipfs-cluster-ctl 2017-12-06 20:12:01 +01:00
client.go Fix #260: Add REST API client and use it in ipfs-cluster-ctl 2017-12-06 20:12:01 +01:00
methods.go Fix #260: Add REST API client and use it in ipfs-cluster-ctl 2017-12-06 20:12:01 +01:00
README.md Fix #260: Add REST API client and use it in ipfs-cluster-ctl 2017-12-06 20:12:01 +01:00
request.go Fix #260: Add REST API client and use it in ipfs-cluster-ctl 2017-12-06 20:12:01 +01:00
tls.go Fix #260: Add REST API client and use it in ipfs-cluster-ctl 2017-12-06 20:12:01 +01:00

ipfs-cluster client

Made by Main project IRC channel standard-readme compliant GoDoc Go Report Card Build Status Coverage Status

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