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 - may be used as an HTTP client that automatically authenticates using oauth.
func NewClient ¶
NewClient - creates and returns a *Client ready to use. If skipVerify is true, it will skip verification of the remote TLS certificate.
func (*Client) Getv2 ¶
Getv2 - makes a GET request to the registry's /v2/ endpoint. If a 401 Unauthorized response is received, this method attempts to obtain an oauth token and tries again with the new token. If a username and password are available, they are used with Basic Auth in the request to the token service. This method is goroutine-safe.
func (*Client) Getv2WithScope ¶
Getv2WithScope - makes a GET request to the registry's /v2/ endpoint. If a 401 Unauthorized response is received, this method attempts to obtain an oauth token with the given imageNames as scopes and tries again with the new token. If a username and password are available, they are used with Basic Auth in the request to the token service. This method is goroutine-safe.
func (*Client) NewRequest ¶
NewRequest - creates and returns a *http.Request assuming the GET method. The base URL configured on the Client gets used with its Path component replaced by the path argument. If a token is available, it is added to the request automatically. "Accept: application/json" is added to all requests. The caller should customize the request as necessary before using it.