Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client facilitates making HTTP requests to the GitHub API.
func BasicClient ¶
func BasicClient() *Client
BasicClient returns a basic implemenation of a http client.
type ClientOption ¶
type ClientOption = func(http.RoundTripper) http.RoundTripper
ClientOption represents an argument to NewClient.
func ReplaceTripper ¶
func ReplaceTripper(tr http.RoundTripper) ClientOption
ReplaceTripper substitutes the underlying RoundTripper with a custom one.
type FakeHTTP ¶
type FakeHTTP struct { // Requests stores references to sequential requests that RoundTrip has received Requests []*http.Request // contains filtered or unexported fields }
FakeHTTP provides a mechanism by which to stub HTTP responses through.
func (*FakeHTTP) StubResponse ¶
StubResponse pre-records an HTTP response.
func (*FakeHTTP) StubWithFixture ¶
StubWithFixture pre-records an HTTP response from a fixture file.
type Tracer ¶
type Tracer struct {
http.RoundTripper
}
Tracer implements http.RoundTripper. It prints each request and response/error to os.Stderr.
Click to show internal directories.
Click to hide internal directories.