Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnsupportedContentType = errors.New("unsupported content type")
)
Common errors
Functions ¶
func DecodeJSON ¶
DecodeJSON decodes a json response body into a value reciever.
func DecodeText ¶
DecodeText decodes a text/plain response body and returns it as a string.
Types ¶
type Client ¶
type Client interface { CreateRequest(method, url string, body interface{}) (*http.Request, error) Do(req *http.Request) (*http.Response, error) }
Client rpc client interface for creating and executing requrests.
type MockClient ¶
type MockClient struct { Client Responses MockResponses }
MockClient mock implementation of a client.
type MockResponse ¶
type MockResponse struct { Body interface{} Err error }
MockResponse mocked rpc response.
Click to show internal directories.
Click to hide internal directories.