package
0.0.0-20191119134328-9ff59ee4c896
Repository: https://github.com/dictybase/apihelpers.git
Documentation: pkg.go.dev
# Functions
APIServer returns a new test API endpoint.
IndentJSON uniformly indent the json byte.
MatchJSON compares actual and expected json.
NewHTTPExpectBuilder is the constructor for HTTPExpectBuilder.
NewHTTPRequestBuilder is the constructor for HTTPRequestBuilder.
NewHTTPResponseBuilder is the constructor for HTTPResponseBuilder.
NewTestApiInfo is a constructor for TestAPIInfo.
# Constants
APIHost is the default http host for testing.
PathPrefix is the default prefix for appending to the API host.
PubID is publication id for testing.
# Structs
HTTPExpectBuilder implements ExpectBuilder interface.
HTTPRequestBuilder implements RequestBuilder interface.
HTTPResponseBuilder implements ResponseBuilder interface.
TestAPIInfo implements jsonapi.ServerInformation.
# Interfaces
ExpectBuilder interface is for incremental building of http configuration.
Reporter interface is used for reporting test failures.
RequestBuilder interface is for incremental building of RequestBuilder to receive a ResponseBuilder object.
Resource is the interface that every http handler have to implement.
ResponseBuilder interface is for incremental testing of http response and json object.