63972f2b2e
This is a preparatory PR to add additional APIs (Pinning Service API) easily to cluster. Instead of copy-pasting most of what the REST API does, I have refactored so that the whole configuration, routing and request-handling utilities can be re-used. The worst part has been to divide the test between tests that test core (common.API) functionality and tests that test specific REST API endpoint functionality. I could not get away without an additional common/test package to provide functions that are used from both places. This is a side effect of testing both http and libp2p endpoints for every request etc. |
||
---|---|---|
.. | ||
client | ||
config.go | ||
restapi_test.go | ||
restapi.go |