Documentation ¶
Overview ¶
Package types defines various types that have no other internal imports This allows them to be used between other packages without creating import loops
Index ¶
Constants ¶
View Source
const ( // MediaTypeDocker1Manifest deprecated media type for docker schema1 manifests MediaTypeDocker1Manifest = "application/vnd.docker.distribution.manifest.v1+json" // MediaTypeDocker1ManifestSigned is a deprecated schema1 manifest with jws signing MediaTypeDocker1ManifestSigned = "application/vnd.docker.distribution.manifest.v1+prettyjws" // MediaTypeDocker2Manifest is the media type when pulling manifests from a v2 registry MediaTypeDocker2Manifest = "application/vnd.docker.distribution.manifest.v2+json" // MediaTypeDocker2ManifestList is the media type when pulling a manifest list from a v2 registry MediaTypeDocker2ManifestList = "application/vnd.docker.distribution.manifest.list.v2+json" // MediaTypeDocker2ImageConfig is for the configuration json object media type MediaTypeDocker2ImageConfig = "application/vnd.docker.container.image.v1+json" // MediaTypeOCI1Manifest OCI v1 manifest media type MediaTypeOCI1Manifest = "application/vnd.oci.image.manifest.v1+json" // MediaTypeOCI1ManifestList OCI v1 manifest list media type MediaTypeOCI1ManifestList = "application/vnd.oci.image.index.v1+json" // MediaTypeOCI1ImageConfig OCI v1 configuration json object media type MediaTypeOCI1ImageConfig = "application/vnd.oci.image.config.v1+json" // MediaTypeDocker2Layer is the default compressed layer for docker schema2 MediaTypeDocker2Layer = "application/vnd.docker.image.rootfs.diff.tar.gzip" // MediaTypeOCI1Layer is the uncompressed layer for OCIv1 MediaTypeOCI1Layer = "application/vnd.oci.image.layer.v1.tar" // MediaTypeOCI1LayerGzip is the gzip compressed layer for OCI v1 MediaTypeOCI1LayerGzip = "application/vnd.oci.image.layer.v1.tar+gzip" // MediaTypeBuildkitCacheConfig is used by buildkit cache images MediaTypeBuildkitCacheConfig = "application/vnd.buildkit.cacheconfig.v0" )
Variables ¶
View Source
var ( // ErrAllRequestsFailed when there are no mirrors left to try ErrAllRequestsFailed = errors.New("all requests failed") // ErrAPINotFound if an api is not available for the host ErrAPINotFound = errors.New("API not found") // ErrBackoffLimit maximum backoff attempts reached ErrBackoffLimit = errors.New("backoff limit reached") // ErrCanceled if the context was canceled ErrCanceled = errors.New("context was canceled") // ErrDigestMismatch if the expected digest wasn't received ErrDigestMismatch = errors.New("digest mismatch") // ErrEmptyChallenge indicates an issue with the received challenge in the WWW-Authenticate header ErrEmptyChallenge = errors.New("empty challenge header") // ErrHTTPStatus if the http status code was unexpected ErrHTTPStatus = errors.New("unexpected http status code") // ErrInvalidChallenge indicates an issue with the received challenge in the WWW-Authenticate header ErrInvalidChallenge = errors.New("invalid challenge header") // ErrMissingDigest returned when image reference does not include a digest ErrMissingDigest = errors.New("digest missing from image reference") // ErrMissingLocation returned when the location header is missing ErrMissingLocation = errors.New("location header missing") // ErrMissingName returned when name missing for host ErrMissingName = errors.New("name missing") // ErrMissingTag returned when image reference does not include a tag ErrMissingTag = errors.New("tag missing from image reference") // ErrMissingTagOrDigest returned when image reference does not include a tag or digest ErrMissingTagOrDigest = errors.New("tag or Digest missing from image reference") // ErrMountReturnedLocation when a blob mount fails but a location header is received ErrMountReturnedLocation = errors.New("blob mount returned a location to upload") // ErrNoNewChallenge indicates a challenge update did not result in any change ErrNoNewChallenge = errors.New("no new challenge") // ErrNotFound isn't there, search for your value elsewhere ErrNotFound = errors.New("not found") // ErrNotImplemented returned when method has not been implemented yet ErrNotImplemented = errors.New("not implemented") // ErrParsingFailed when a string cannot be parsed ErrParsingFailed = errors.New("parsing failed") // ErrRateLimit when requests exceed server rate limit ErrRateLimit = errors.New("rate limit exceeded") // ErrRetryNeeded indicates a request needs to be retried ErrRetryNeeded = errors.New("retry needed") ErrUnavailable = errors.New("unavailable") ErrUnauthorized = errors.New("unauthorized") // ErrUnsupported indicates the request was unsupported ErrUnsupported = errors.New("unsupported") // ErrUnsupportedAPI happens when an API is not supported on a registry ErrUnsupportedAPI = errors.New("unsupported API") // ErrUnsupportedConfigVersion happens when config file version is greater than this command supports ErrUnsupportedConfigVersion = errors.New("unsupported config version") // ErrUnsupportedMediaType returned when media type is unknown or unsupported ErrUnsupportedMediaType = errors.New("unsupported media type") )
Functions ¶
This section is empty.
Types ¶
type Descriptor ¶
type Descriptor struct { // MediaType describe the type of the content. MediaType string `json:"mediaType,omitempty"` // Size in bytes of content. Size int64 `json:"size,omitempty"` // Digest uniquely identifies the content. Digest digest.Digest `json:"digest,omitempty"` // URLs contains the source URLs of this content. URLs []string `json:"urls,omitempty"` // Annotations contains arbitrary metadata relating to the targeted content. Annotations map[string]string `json:"annotations,omitempty"` // Platform describes the platform which the image in the manifest runs on. // This should only be used when referring to a manifest. Platform *platform.Platform `json:"platform,omitempty"` }
Descriptor is used in manifests to refer to content by media type, size, and digest.
func (Descriptor) MarshalPrettyTW ¶
func (d Descriptor) MarshalPrettyTW(tw *tabwriter.Writer, prefix string) error
Directories ¶
Path | Synopsis |
---|---|
Package blob is the underlying type for pushing and pulling blobs
|
Package blob is the underlying type for pushing and pulling blobs |
Package docker defines the common types for all docker schemas
|
Package docker defines the common types for all docker schemas |
schema1
Package schema1 defines the manifest and json marshal/unmarshal for docker schema1
|
Package schema1 defines the manifest and json marshal/unmarshal for docker schema1 |
schema2
Package schema2 contains structs for Docker schema v2 manifests.
|
Package schema2 contains structs for Docker schema v2 manifests. |
Package manifest abstracts the various types of supported manifests.
|
Package manifest abstracts the various types of supported manifests. |
Package oci defiles OCI image-spec types Package oci defines common settings for all OCI types
|
Package oci defiles OCI image-spec types Package oci defines common settings for all OCI types |
v1
Package v1 defiles version 1 of OCI image-spec types
|
Package v1 defiles version 1 of OCI image-spec types |
Package platform handles the parsing and comparing of the image platform (e.g.
|
Package platform handles the parsing and comparing of the image platform (e.g. |
Package ref is used to define references References default to remote registry references (registry:port/repo:tag) Schemes can be included in front of the reference for different reference types
|
Package ref is used to define references References default to remote registry references (registry:port/repo:tag) Schemes can be included in front of the reference for different reference types |
Package repo handles a list of repositories from a registry
|
Package repo handles a list of repositories from a registry |
Package tag is used for wrapping tag lists
|
Package tag is used for wrapping tag lists |
Click to show internal directories.
Click to hide internal directories.