ipfs-cluster/test
Hector Sanjuan 7c636061bd
Improve pin/unpin method signatures (#843)
* Improve pin/unpin method signatures:

These changes the following Cluster Go API methods:

* -> Cluster.Pin(ctx, cid, options) (pin, error)
* -> Cluster.Unpin(ctx, cid) (pin, error)
* -> Cluster.PinPath(ctx, path, opts) (pin,error)

Pin and Unpin now return the pinned object.

The signature of the methods now matches that of the API Client, is clearer as
to what options the user can set and is aligned with PinPath, UnpinPath, which
returned pin methods.

The REST API now returns the Pinned/Unpinned object rather than 204-Accepted.

This was necessary for a cleaner pin/update approach, which I'm working on in
another branch.

Most of the changes here are updating tests to the new signatures

* Adapt load-balancing client to new Pin/Unpin signatures

* cluster.go: Fix typo

Co-Authored-By: Kishan Sagathiya <kishansagathiya@gmail.com>

* cluster.go: Fix typo

Co-Authored-By: Kishan Sagathiya <kishansagathiya@gmail.com>
2019-07-22 15:39:11 +02:00
..
cids.go Update deps along with go-libp2p-core refactor 2019-06-14 13:10:45 +02:00
ipfs_mock.go Merge pull request #738 from ipfs/issue_497 2019-07-04 13:53:20 +01:00
rpc_api_mock.go Improve pin/unpin method signatures (#843) 2019-07-22 15:39:11 +02:00
sharding.go Rename "test.Test*" to "test.*" (test.TestCid1 -> test.Cid1) 2019-02-27 20:19:10 +00:00
test_test.go Feat: Split components into RPC Services 2019-05-04 21:36:10 +01:00
test.go Add/improve godoc descriptions for some modules. 2018-08-23 14:14:06 +02:00