Documentation ¶
Overview ¶
Package remote provides facilities for reading/writing v1.Images from/to a remote image registry.
Index ¶
- func CheckError(resp *http.Response, codes ...int) error
- func Delete(ref name.Reference, auth authn.Authenticator, t http.RoundTripper) error
- func Image(ref name.Reference, options ...ImageOption) (v1.Image, error)
- func List(repo name.Repository, auth authn.Authenticator, t http.RoundTripper) ([]string, error)
- func Write(ref name.Reference, img v1.Image, auth authn.Authenticator, ...) error
- type Diagnostic
- type Error
- type ErrorCode
- type ImageOption
- type MountableLayer
- type Tags
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(ref name.Reference, auth authn.Authenticator, t http.RoundTripper) error
Delete removes the specified image reference from the remote registry.
func Image ¶
Image provides access to a remote image reference, applying functional options to the underlying imageOpener before resolving the reference into a v1.Image.
func List ¶
func List(repo name.Repository, auth authn.Authenticator, t http.RoundTripper) ([]string, error)
TODO(jonjohnsonjr): return []name.Tag?
Types ¶
type Diagnostic ¶
type Diagnostic struct { Code ErrorCode `json:"code"` Message string `json:"message,omitempty"` Detail interface{} `json:"detail,omitempty"` }
Diagnostic represents a single error returned by a Docker registry interaction.
type Error ¶
type Error struct {
Errors []Diagnostic `json:"errors,omitempty"`
}
Error implements error to support the following error specification: https://github.com/docker/distribution/blob/master/docs/spec/api.md#errors
type ErrorCode ¶
type ErrorCode string
ErrorCode is an enumeration of supported error codes.
const ( BlobUnknownErrorCode ErrorCode = "BLOB_UNKNOWN" BlobUploadInvalidErrorCode ErrorCode = "BLOB_UPLOAD_INVALID" BlobUploadUnknownErrorCode ErrorCode = "BLOB_UPLOAD_UNKNOWN" DigestInvalidErrorCode ErrorCode = "DIGEST_INVALID" ManifestBlobUnknownErrorCode ErrorCode = "MANIFEST_BLOB_UNKNOWN" ManifestInvalidErrorCode ErrorCode = "MANIFEST_INVALID" ManifestUnknownErrorCode ErrorCode = "MANIFEST_UNKNOWN" ManifestUnverifiedErrorCode ErrorCode = "MANIFEST_UNVERIFIED" NameInvalidErrorCode ErrorCode = "NAME_INVALID" NameUnknownErrorCode ErrorCode = "NAME_UNKNOWN" SizeInvalidErrorCode ErrorCode = "SIZE_INVALID" TagInvalidErrorCode ErrorCode = "TAG_INVALID" DeniedErrorCode ErrorCode = "DENIED" UnsupportedErrorCode ErrorCode = "UNSUPPORTED" )
The set of error conditions a registry may return: https://github.com/docker/distribution/blob/master/docs/spec/api.md#errors-2
type ImageOption ¶
type ImageOption func(*imageOpener) error
func WithAuth ¶
func WithAuth(auth authn.Authenticator) ImageOption
WithAuth is a functional option for overriding the default authenticator on a remote image
func WithAuthFromKeychain ¶
func WithAuthFromKeychain(keys authn.Keychain) ImageOption
WithAuthFromKeychain is a functional option for overriding the default authenticator on a remote image using an authn.Keychain
func WithTransport ¶
func WithTransport(t http.RoundTripper) ImageOption
WithTransport is a functional option for overriding the default transport on a remote image
type MountableLayer ¶
MountableLayer wraps a v1.Layer in a shim that enables the layer to be "mounted" when published to another registry.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package transport provides facilities for setting up an authenticated http.RoundTripper given an Authenticator and base RoundTripper.
|
Package transport provides facilities for setting up an authenticated http.RoundTripper given an Authenticator and base RoundTripper. |