mirror of
https://github.com/regclient/regclient.git
synced 2025-04-18 22:44:00 +03:00
I feel like I need to explain, this is all to move the descriptor package. The platform package could not use the predefined errors in types because of a circular dependency from descriptor. The most appropriate way to reorg this is to move descriptor out of the type package since it was more complex than a self contained type. When doing that, type aliases were needed to avoid breaking changes to existing users. Those aliases themselves caused circular dependency loops because of the media types and errors, so those were also pulled out to separate packages. All of the old values were aliased and deprecated, and to fix the linter, those deprecations were fixed by updating the imports... everywhere. Signed-off-by: Brandon Mitchell <git@bmitch.net>
92 lines
3.9 KiB
Go
92 lines
3.9 KiB
Go
package types
|
|
|
|
import (
|
|
"github.com/regclient/regclient/types/mediatype"
|
|
)
|
|
|
|
const (
|
|
// MediaTypeDocker1Manifest deprecated media type for docker schema1 manifests.
|
|
//
|
|
// Deprecated: replace with [mediatype.Docker1Manifest].
|
|
MediaTypeDocker1Manifest = mediatype.Docker1Manifest
|
|
// MediaTypeDocker1ManifestSigned is a deprecated schema1 manifest with jws signing.
|
|
//
|
|
// Deprecated: replace with [mediatype.Docker1ManifestSigned].
|
|
MediaTypeDocker1ManifestSigned = mediatype.Docker1ManifestSigned
|
|
// MediaTypeDocker2Manifest is the media type when pulling manifests from a v2 registry.
|
|
//
|
|
// Deprecated: replace with [mediatype.Docker2Manifest].
|
|
MediaTypeDocker2Manifest = mediatype.Docker2Manifest
|
|
// MediaTypeDocker2ManifestList is the media type when pulling a manifest list from a v2 registry.
|
|
//
|
|
// Deprecated: replace with [mediatype.Docker2ManifestList].
|
|
MediaTypeDocker2ManifestList = mediatype.Docker2ManifestList
|
|
// MediaTypeDocker2ImageConfig is for the configuration json object media type.
|
|
//
|
|
// Deprecated: replace with [mediatype.Docker2ImageConfig].
|
|
MediaTypeDocker2ImageConfig = mediatype.Docker2ImageConfig
|
|
// MediaTypeOCI1Artifact EXPERIMENTAL OCI v1 artifact media type.
|
|
//
|
|
// Deprecated: replace with [mediatype.OCI1Artifact].
|
|
MediaTypeOCI1Artifact = mediatype.OCI1Artifact
|
|
// MediaTypeOCI1Manifest OCI v1 manifest media type.
|
|
//
|
|
// Deprecated: replace with [mediatype.OCI1Manifest].
|
|
MediaTypeOCI1Manifest = mediatype.OCI1Manifest
|
|
// MediaTypeOCI1ManifestList OCI v1 manifest list media type.
|
|
//
|
|
// Deprecated: replace with [mediatype.OCI1ManifestList].
|
|
MediaTypeOCI1ManifestList = mediatype.OCI1ManifestList
|
|
// MediaTypeOCI1ImageConfig OCI v1 configuration json object media type.
|
|
//
|
|
// Deprecated: replace with [mediatype.OCI1ImageConfig].
|
|
MediaTypeOCI1ImageConfig = mediatype.OCI1ImageConfig
|
|
// MediaTypeDocker2LayerGzip is the default compressed layer for docker schema2.
|
|
//
|
|
// Deprecated: replace with [mediatype.Docker2LayerGzip].
|
|
MediaTypeDocker2LayerGzip = mediatype.Docker2LayerGzip
|
|
// MediaTypeDocker2ForeignLayer is the default compressed layer for foreign layers in docker schema2.
|
|
//
|
|
// Deprecated: replace with [mediatype.Docker2ForeignLayer].
|
|
MediaTypeDocker2ForeignLayer = mediatype.Docker2ForeignLayer
|
|
// MediaTypeOCI1Layer is the uncompressed layer for OCIv1.
|
|
//
|
|
// Deprecated: replace with [mediatype.OCI1Layer].
|
|
MediaTypeOCI1Layer = mediatype.OCI1Layer
|
|
// MediaTypeOCI1LayerGzip is the gzip compressed layer for OCI v1.
|
|
//
|
|
// Deprecated: replace with [mediatype.OCI1LayerGzip].
|
|
MediaTypeOCI1LayerGzip = mediatype.OCI1LayerGzip
|
|
// MediaTypeOCI1LayerZstd is the zstd compressed layer for OCI v1.
|
|
//
|
|
// Deprecated: replace with [mediatype.OCI1LayerZstd].
|
|
MediaTypeOCI1LayerZstd = mediatype.OCI1LayerZstd
|
|
// MediaTypeOCI1ForeignLayer is the foreign layer for OCI v1.
|
|
//
|
|
// Deprecated: replace with [mediatype.OCI1ForeignLayer].
|
|
MediaTypeOCI1ForeignLayer = mediatype.OCI1ForeignLayer
|
|
// MediaTypeOCI1ForeignLayerGzip is the gzip compressed foreign layer for OCI v1.
|
|
//
|
|
// Deprecated: replace with [mediatype.OCI1ForeignLayerGzip].
|
|
MediaTypeOCI1ForeignLayerGzip = mediatype.OCI1ForeignLayerGzip
|
|
// MediaTypeOCI1ForeignLayerZstd is the zstd compressed foreign layer for OCI v1.
|
|
//
|
|
// Deprecated: replace with [mediatype.OCI1ForeignLayerZstd].
|
|
MediaTypeOCI1ForeignLayerZstd = mediatype.OCI1ForeignLayerZstd
|
|
// MediaTypeOCI1Empty is used for blobs containing the empty JSON data `{}`.
|
|
//
|
|
// Deprecated: replace with [mediatype.OCI1Empty].
|
|
MediaTypeOCI1Empty = mediatype.OCI1Empty
|
|
// MediaTypeBuildkitCacheConfig is used by buildkit cache images.
|
|
//
|
|
// Deprecated: replace with [mediatype.BuildkitCacheConfig].
|
|
MediaTypeBuildkitCacheConfig = mediatype.BuildkitCacheConfig
|
|
)
|
|
|
|
var (
|
|
// Base cleans the Content-Type header to return only the lower case base media type.
|
|
//
|
|
// Deprecated: replace with [mediatype.Base].
|
|
MediaTypeBase = mediatype.Base
|
|
)
|