types

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2025 License: Apache-2.0 Imports: 4 Imported by: 6

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 (
	// AnnotationCreated is the annotation key for the date and time on which the image was built (date-time string as defined by RFC 3339).
	AnnotationCreated = "org.opencontainers.image.created"

	// AnnotationAuthors is the annotation key for the contact details of the people or organization responsible for the image (freeform string).
	AnnotationAuthors = "org.opencontainers.image.authors"

	// AnnotationURL is the annotation key for the URL to find more information on the image.
	AnnotationURL = "org.opencontainers.image.url"

	// AnnotationDocumentation is the annotation key for the URL to get documentation on the image.
	AnnotationDocumentation = "org.opencontainers.image.documentation"

	// AnnotationSource is the annotation key for the URL to get source code for building the image.
	AnnotationSource = "org.opencontainers.image.source"

	// AnnotationVersion is the annotation key for the version of the packaged software.
	// The version MAY match a label or tag in the source code repository.
	// The version MAY be Semantic versioning-compatible.
	AnnotationVersion = "org.opencontainers.image.version"

	// AnnotationRevision is the annotation key for the source control revision identifier for the packaged software.
	AnnotationRevision = "org.opencontainers.image.revision"

	// AnnotationVendor is the annotation key for the name of the distributing entity, organization or individual.
	AnnotationVendor = "org.opencontainers.image.vendor"

	// AnnotationLicenses is the annotation key for the license(s) under which contained software is distributed as an SPDX License Expression.
	AnnotationLicenses = "org.opencontainers.image.licenses"

	// AnnotationRefName is the annotation key for the name of the reference for a target.
	// SHOULD only be considered valid when on descriptors on `index.json` within image layout.
	AnnotationRefName = "org.opencontainers.image.ref.name"

	// AnnotationTitle is the annotation key for the human-readable title of the image.
	AnnotationTitle = "org.opencontainers.image.title"

	// AnnotationDescription is the annotation key for the human-readable description of the software packaged in the image.
	AnnotationDescription = "org.opencontainers.image.description"

	// AnnotationBaseImageDigest is the annotation key for the digest of the image's base image.
	AnnotationBaseImageDigest = "org.opencontainers.image.base.digest"

	// AnnotationBaseImageName is the annotation key for the image reference of the image's base image.
	AnnotationBaseImageName = "org.opencontainers.image.base.name"

	// AnnotationArtifactCreated is the annotation key for the date and time on which the artifact was built, conforming to RFC 3339.
	AnnotationArtifactCreated = "org.opencontainers.artifact.created"

	// AnnotationArtifactDescription is the annotation key for the human readable description for the artifact.
	AnnotationArtifactDescription = "org.opencontainers.artifact.description"

	// AnnotationReferrersFiltersApplied is the annotation key for the comma separated list of filters applied by the registry in the referrers listing.
	AnnotationReferrersFiltersApplied = "org.opencontainers.referrers.filtersApplied"
)
View Source
const (
	// MediaTypeDocker1Manifest deprecated media type for docker schema1 manifests.
	//
	// Deprecated: replace with [mediatype.Docker1Manifest].
	//go:fix inline
	MediaTypeDocker1Manifest = mediatype.Docker1Manifest
	// MediaTypeDocker1ManifestSigned is a deprecated schema1 manifest with jws signing.
	//
	// Deprecated: replace with [mediatype.Docker1ManifestSigned].
	//go:fix inline
	MediaTypeDocker1ManifestSigned = mediatype.Docker1ManifestSigned
	// MediaTypeDocker2Manifest is the media type when pulling manifests from a v2 registry.
	//
	// Deprecated: replace with [mediatype.Docker2Manifest].
	//go:fix inline
	MediaTypeDocker2Manifest = mediatype.Docker2Manifest
	// MediaTypeDocker2ManifestList is the media type when pulling a manifest list from a v2 registry.
	//
	// Deprecated: replace with [mediatype.Docker2ManifestList].
	//go:fix inline
	MediaTypeDocker2ManifestList = mediatype.Docker2ManifestList
	// MediaTypeDocker2ImageConfig is for the configuration json object media type.
	//
	// Deprecated: replace with [mediatype.Docker2ImageConfig].
	//go:fix inline
	MediaTypeDocker2ImageConfig = mediatype.Docker2ImageConfig
	// MediaTypeOCI1Artifact EXPERIMENTAL OCI v1 artifact media type.
	//
	// Deprecated: replace with [mediatype.OCI1Artifact].
	//go:fix inline
	MediaTypeOCI1Artifact = mediatype.OCI1Artifact
	// MediaTypeOCI1Manifest OCI v1 manifest media type.
	//
	// Deprecated: replace with [mediatype.OCI1Manifest].
	//go:fix inline
	MediaTypeOCI1Manifest = mediatype.OCI1Manifest
	// MediaTypeOCI1ManifestList OCI v1 manifest list media type.
	//
	// Deprecated: replace with [mediatype.OCI1ManifestList].
	//go:fix inline
	MediaTypeOCI1ManifestList = mediatype.OCI1ManifestList
	// MediaTypeOCI1ImageConfig OCI v1 configuration json object media type.
	//
	// Deprecated: replace with [mediatype.OCI1ImageConfig].
	//go:fix inline
	MediaTypeOCI1ImageConfig = mediatype.OCI1ImageConfig
	// MediaTypeDocker2LayerGzip is the default compressed layer for docker schema2.
	//
	// Deprecated: replace with [mediatype.Docker2LayerGzip].
	//go:fix inline
	MediaTypeDocker2LayerGzip = mediatype.Docker2LayerGzip
	// MediaTypeDocker2ForeignLayer is the default compressed layer for foreign layers in docker schema2.
	//
	// Deprecated: replace with [mediatype.Docker2ForeignLayer].
	//go:fix inline
	MediaTypeDocker2ForeignLayer = mediatype.Docker2ForeignLayer
	// MediaTypeOCI1Layer is the uncompressed layer for OCIv1.
	//
	// Deprecated: replace with [mediatype.OCI1Layer].
	//go:fix inline
	MediaTypeOCI1Layer = mediatype.OCI1Layer
	// MediaTypeOCI1LayerGzip is the gzip compressed layer for OCI v1.
	//
	// Deprecated: replace with [mediatype.OCI1LayerGzip].
	//go:fix inline
	MediaTypeOCI1LayerGzip = mediatype.OCI1LayerGzip
	// MediaTypeOCI1LayerZstd is the zstd compressed layer for OCI v1.
	//
	// Deprecated: replace with [mediatype.OCI1LayerZstd].
	//go:fix inline
	MediaTypeOCI1LayerZstd = mediatype.OCI1LayerZstd
	// MediaTypeOCI1ForeignLayer is the foreign layer for OCI v1.
	//
	// Deprecated: replace with [mediatype.OCI1ForeignLayer].
	//go:fix inline
	MediaTypeOCI1ForeignLayer = mediatype.OCI1ForeignLayer
	// MediaTypeOCI1ForeignLayerGzip is the gzip compressed foreign layer for OCI v1.
	//
	// Deprecated: replace with [mediatype.OCI1ForeignLayerGzip].
	//go:fix inline
	MediaTypeOCI1ForeignLayerGzip = mediatype.OCI1ForeignLayerGzip
	// MediaTypeOCI1ForeignLayerZstd is the zstd compressed foreign layer for OCI v1.
	//
	// Deprecated: replace with [mediatype.OCI1ForeignLayerZstd].
	//go:fix inline
	MediaTypeOCI1ForeignLayerZstd = mediatype.OCI1ForeignLayerZstd
	// MediaTypeOCI1Empty is used for blobs containing the empty JSON data `{}`.
	//
	// Deprecated: replace with [mediatype.OCI1Empty].
	//go:fix inline
	MediaTypeOCI1Empty = mediatype.OCI1Empty
	// MediaTypeBuildkitCacheConfig is used by buildkit cache images.
	//
	// Deprecated: replace with [mediatype.BuildkitCacheConfig].
	//go:fix inline
	MediaTypeBuildkitCacheConfig = mediatype.BuildkitCacheConfig
)
View Source
const (
	// LevelTrace is used for tracing network requests.
	LevelTrace = slog.LevelDebug - 4
)

Variables

View Source
var (
	// EmptyData is the content of the empty JSON descriptor. See [mediatype.OCI1Empty].
	//
	// Deprecated: replace with [descriptor.EmptyData].
	//go:fix inline
	EmptyData = descriptor.EmptyData
	// EmptyDigest is the digest of the empty JSON descriptor. See [mediatype.OCI1Empty].
	//
	// Deprecated: replace with [descriptor.EmptyDigest].
	//go:fix inline
	EmptyDigest = descriptor.EmptyDigest
	// DescriptorListFilter returns a list of descriptors from the list matching the search options.
	// When opt.SortAnnotation is set, the order of descriptors with matching annotations is undefined.
	//
	// Deprecated: replace with [descriptor.DescriptorListFilter]
	//go:fix inline
	DescriptorListFilter = descriptor.DescriptorListFilter
	// DescriptorListSearch returns the first descriptor from the list matching the search options.
	//
	// Deprecated: replace with [descriptor.DescriptorListSearch]
	//go:fix inline
	DescriptorListSearch = descriptor.DescriptorListSearch
)
View Source
var (
	// ErrAllRequestsFailed when there are no mirrors left to try
	//
	// Deprecated: replace with [errs.ErrAllRequestsFailed].
	//go:fix inline
	ErrAllRequestsFailed = errs.ErrAllRequestsFailed
	// ErrAPINotFound if an api is not available for the host
	//
	// Deprecated: replace with [errs.ErrAPINotFound].
	//go:fix inline
	ErrAPINotFound = errs.ErrAPINotFound
	// ErrBackoffLimit maximum backoff attempts reached
	//
	// Deprecated: replace with [errs.ErrBackoffLimit].
	//go:fix inline
	ErrBackoffLimit = errs.ErrBackoffLimit
	// ErrCanceled if the context was canceled
	//
	// Deprecated: replace with [errs.ErrCanceled].
	//go:fix inline
	ErrCanceled = errs.ErrCanceled
	// ErrDigestMismatch if the expected digest wasn't received
	//
	// Deprecated: replace with [errs.ErrDigestMismatch].
	//go:fix inline
	ErrDigestMismatch = errs.ErrDigestMismatch
	// ErrEmptyChallenge indicates an issue with the received challenge in the WWW-Authenticate header
	//
	// Deprecated: replace with [errs.ErrEmptyChallenge].
	//go:fix inline
	ErrEmptyChallenge = errs.ErrEmptyChallenge
	// ErrFileDeleted indicates a requested file has been deleted
	//
	// Deprecated: replace with [errs.ErrFileDeleted].
	//go:fix inline
	ErrFileDeleted = errs.ErrFileDeleted
	// ErrFileNotFound indicates a requested file is not found
	//
	// Deprecated: replace with [errs.ErrFileNotFound].
	//go:fix inline
	ErrFileNotFound = errs.ErrFileNotFound
	// ErrHTTPStatus if the http status code was unexpected
	//
	// Deprecated: replace with [errs.ErrHTTPStatus].
	//go:fix inline
	ErrHTTPStatus = errs.ErrHTTPStatus
	// ErrInvalidChallenge indicates an issue with the received challenge in the WWW-Authenticate header
	//
	// Deprecated: replace with [errs.ErrInvalidChallenge].
	//go:fix inline
	ErrInvalidChallenge = errs.ErrInvalidChallenge
	// ErrInvalidReference indicates the reference to an image is has an invalid syntax
	//
	// Deprecated: replace with [errs.ErrInvalidReference].
	//go:fix inline
	ErrInvalidReference = errs.ErrInvalidReference
	// ErrLoopDetected indicates a child node points back to the parent
	//
	// Deprecated: replace with [errs.ErrLoopDetected].
	//go:fix inline
	ErrLoopDetected = errs.ErrLoopDetected
	// ErrManifestNotSet indicates the manifest is not set, it must be pulled with a ManifestGet first
	//
	// Deprecated: replace with [errs.ErrManifestNotSet].
	//go:fix inline
	ErrManifestNotSet = errs.ErrManifestNotSet
	// ErrMissingAnnotation returned when a needed annotation is not found
	//
	// Deprecated: replace with [errs.ErrMissingAnnotation].
	//go:fix inline
	ErrMissingAnnotation = errs.ErrMissingAnnotation
	// ErrMissingDigest returned when image reference does not include a digest
	//
	// Deprecated: replace with [errs.ErrMissingDigest].
	//go:fix inline
	ErrMissingDigest = errs.ErrMissingDigest
	// ErrMissingLocation returned when the location header is missing
	//
	// Deprecated: replace with [errs.ErrMissingLocation].
	//go:fix inline
	ErrMissingLocation = errs.ErrMissingLocation
	// ErrMissingName returned when name missing for host
	//
	// Deprecated: replace with [errs.ErrMissingName].
	//go:fix inline
	ErrMissingName = errs.ErrMissingName
	// ErrMissingTag returned when image reference does not include a tag
	//
	// Deprecated: replace with [errs.ErrMissingTag].
	//go:fix inline
	ErrMissingTag = errs.ErrMissingTag
	// ErrMissingTagOrDigest returned when image reference does not include a tag or digest
	//
	// Deprecated: replace with [errs.ErrMissingTagOrDigest].
	//go:fix inline
	ErrMissingTagOrDigest = errs.ErrMissingTagOrDigest
	// ErrMismatch returned when a comparison detects a difference
	//
	// Deprecated: replace with [errs.ErrMismatch].
	//go:fix inline
	ErrMismatch = errs.ErrMismatch
	// ErrMountReturnedLocation when a blob mount fails but a location header is received
	//
	// Deprecated: replace with [errs.ErrMountReturnedLocation].
	//go:fix inline
	ErrMountReturnedLocation = errs.ErrMountReturnedLocation
	// ErrNoNewChallenge indicates a challenge update did not result in any change
	//
	// Deprecated: replace with [errs.ErrNoNewChallenge].
	//go:fix inline
	ErrNoNewChallenge = errs.ErrNoNewChallenge
	// ErrNotFound isn't there, search for your value elsewhere
	//
	// Deprecated: replace with [errs.ErrNotFound].
	//go:fix inline
	ErrNotFound = errs.ErrNotFound
	// ErrNotImplemented returned when method has not been implemented yet
	//
	// Deprecated: replace with [errs.ErrNotImplemented].
	//go:fix inline
	ErrNotImplemented = errs.ErrNotImplemented
	// ErrNotRetryable indicates the process cannot be retried
	//
	// Deprecated: replace with [errs.ErrNotRetryable].
	//go:fix inline
	ErrNotRetryable = errs.ErrNotRetryable
	// ErrParsingFailed when a string cannot be parsed
	//
	// Deprecated: replace with [errs.ErrParsingFailed].
	//go:fix inline
	ErrParsingFailed = errs.ErrParsingFailed
	// ErrRetryNeeded indicates a request needs to be retried
	//
	// Deprecated: replace with [errs.ErrRetryNeeded].
	//go:fix inline
	ErrRetryNeeded = errs.ErrRetryNeeded
	// ErrShortRead if contents are less than expected the size
	//
	// Deprecated: replace with [errs.ErrShortRead].
	//go:fix inline
	ErrShortRead = errs.ErrShortRead
	// ErrSizeLimitExceeded if contents exceed the size limit
	//
	// Deprecated: replace with [errs.ErrSizeLimitExceeded].
	//go:fix inline
	ErrSizeLimitExceeded = errs.ErrSizeLimitExceeded
	// ErrUnavailable when a requested value is not available
	//
	// Deprecated: replace with [errs.ErrUnavailable].
	//go:fix inline
	ErrUnavailable = errs.ErrUnavailable
	// ErrUnsupported indicates the request was unsupported
	//
	// Deprecated: replace with [errs.ErrUnsupported].
	//go:fix inline
	ErrUnsupported = errs.ErrUnsupported
	// ErrUnsupportedAPI happens when an API is not supported on a registry
	//
	// Deprecated: replace with [errs.ErrUnsupportedAPI].
	//go:fix inline
	ErrUnsupportedAPI = errs.ErrUnsupportedAPI
	// ErrUnsupportedConfigVersion happens when config file version is greater than this command supports
	//
	// Deprecated: replace with [errs.ErrUnsupportedConfigVersion].
	//go:fix inline
	ErrUnsupportedConfigVersion = errs.ErrUnsupportedConfigVersion
	// ErrUnsupportedMediaType returned when media type is unknown or unsupported
	//
	// Deprecated: replace with [errs.ErrUnsupportedMediaType].
	//go:fix inline
	ErrUnsupportedMediaType = errs.ErrUnsupportedMediaType
	// ErrHTTPRateLimit when requests exceed server rate limit
	//
	// Deprecated: replace with [errs.ErrHTTPRateLimit].
	//go:fix inline
	ErrHTTPRateLimit = errs.ErrHTTPRateLimit
	// ErrHTTPUnauthorized when authentication fails
	//
	// Deprecated: replace with [errs.ErrHTTPUnauthorized].
	//go:fix inline
	ErrHTTPUnauthorized = errs.ErrHTTPUnauthorized
)
View Source
var MediaTypeBase = mediatype.Base

MediaTypeBase cleans the Content-Type header to return only the lower case base media type.

Deprecated: replace with mediatype.Base.

Functions

This section is empty.

Types

type CallbackKind added in v0.5.0

type CallbackKind int
const (
	CallbackManifest CallbackKind = iota
	CallbackBlob
)

func (CallbackKind) String added in v0.5.0

func (k CallbackKind) String() string

type CallbackState added in v0.5.0

type CallbackState int
const (
	CallbackUndef CallbackState = iota
	CallbackSkipped
	CallbackStarted
	CallbackActive
	CallbackFinished
	CallbackArchived
)

type Descriptor deprecated

type Descriptor = descriptor.Descriptor

Descriptor is used in manifests to refer to content by media type, size, and digest.

Deprecated: replace with descriptor.Descriptor.

type MatchOpt deprecated added in v0.5.2

type MatchOpt = descriptor.MatchOpt

MatchOpt defines conditions for a match descriptor.

Deprecated: replace with descriptor.MatchOpt.

type RateLimit

type RateLimit struct {
	Remain, Limit, Reset int
	Set                  bool
	Policies             []string
}

RateLimit is returned from some http requests

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 descriptor defines the OCI descriptor data structure used in manifests to reference content addressable data.
Package descriptor defines the OCI descriptor data structure used in manifests to reference content addressable data.
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 errs is used for predefined error values.
Package errs is used for predefined error values.
Package manifest abstracts the various types of supported manifests.
Package manifest abstracts the various types of supported manifests.
Package mediatype defines well known media types.
Package mediatype defines well known media types.
oci
Package oci defiles OCI image-spec types
Package oci defiles OCI image-spec types
v1
Package v1 defiles version 1 of OCI image-spec types
Package v1 defiles version 1 of OCI image-spec types
Package ping is used for data types with the Ping methods.
Package ping is used for data types with the Ping methods.
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.
Package ref is used to define references.
Package referrer is used for responses to the referrers to a manifest
Package referrer is used for responses to the referrers to a manifest
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
Package warning is used to handle HTTP warning headers
Package warning is used to handle HTTP warning headers

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL