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 represents a HTTP client connection to a Docker registry.
func CreateClient ¶
func CreateClient(dockerConfig *configfile.ConfigFile) Client
CreateClient create a Client object, using a real HttpClient implementation.
func CreateClientProvidingHTTPClient ¶
func CreateClientProvidingHTTPClient(httpClient HTTPClient, dockerConfig *configfile.ConfigFile) Client
CreateClientProvidingHTTPClient create a Client object, using the provided HttpClient implementation.
func (*Client) GetV2Manifest ¶
GetV2Manifest returns the Docker V2 manifest object that corresponds with the provided registry URL.
type HTTPClient ¶
HTTPClient acts as facade on http.Client, allowing for mock implementations.
type HTTPClientImpl ¶
type HTTPClientImpl struct {
// contains filtered or unexported fields
}
HTTPClientImpl implements HTTPClient, and acts as a facade on http.Client, implementing just the Do method.
type MockHTTPClient ¶
type MockHTTPClient struct {
// contains filtered or unexported fields
}
MockHTTPClient is a mock implementation of HttpClient.
func CreateMockHTTPClient ¶
func CreateMockHTTPClient(res ...http.Response) MockHTTPClient
CreateMockHTTPClient creates a MockHttpClient that returns http.Responses.
func CreateMockHTTPClientErr ¶
func CreateMockHTTPClientErr(err error) MockHTTPClient
CreateMockHTTPClientErr creates a MockHttpClient that returns errors.