types

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: Apache-2.0 Imports: 0 Imported by: 290

Documentation

Overview

Package types holds common OCI media types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MediaType

type MediaType string

MediaType is an enumeration of the supported mime types that an element of an image might have.

const (
	OCIContentDescriptor           MediaType = "application/vnd.oci.descriptor.v1+json"
	OCIImageIndex                  MediaType = "application/vnd.oci.image.index.v1+json"
	OCIManifestSchema1             MediaType = "application/vnd.oci.image.manifest.v1+json"
	OCIConfigJSON                  MediaType = "application/vnd.oci.image.config.v1+json"
	OCILayer                       MediaType = "application/vnd.oci.image.layer.v1.tar+gzip"
	OCILayerZStd                   MediaType = "application/vnd.oci.image.layer.v1.tar+zstd"
	OCIRestrictedLayer             MediaType = "application/vnd.oci.image.layer.nondistributable.v1.tar+gzip"
	OCIUncompressedLayer           MediaType = "application/vnd.oci.image.layer.v1.tar"
	OCIUncompressedRestrictedLayer MediaType = "application/vnd.oci.image.layer.nondistributable.v1.tar"

	DockerManifestSchema1       MediaType = "application/vnd.docker.distribution.manifest.v1+json"
	DockerManifestSchema1Signed MediaType = "application/vnd.docker.distribution.manifest.v1+prettyjws"
	DockerManifestSchema2       MediaType = "application/vnd.docker.distribution.manifest.v2+json"
	DockerManifestList          MediaType = "application/vnd.docker.distribution.manifest.list.v2+json"
	DockerLayer                 MediaType = "application/vnd.docker.image.rootfs.diff.tar.gzip"
	DockerConfigJSON            MediaType = "application/vnd.docker.container.image.v1+json"
	DockerPluginConfig          MediaType = "application/vnd.docker.plugin.v1+json"
	DockerForeignLayer          MediaType = "application/vnd.docker.image.rootfs.foreign.diff.tar.gzip"
	DockerUncompressedLayer     MediaType = "application/vnd.docker.image.rootfs.diff.tar"

	OCIVendorPrefix    = "vnd.oci"
	DockerVendorPrefix = "vnd.docker"
)

The collection of known MediaType values.

func (MediaType) IsConfig added in v0.14.0

func (m MediaType) IsConfig() bool

IsConfig returns true if the mediaType represents a config, as opposed to something else, like an image.

func (MediaType) IsDistributable

func (m MediaType) IsDistributable() bool

IsDistributable returns true if a layer is distributable, see: https://github.com/opencontainers/image-spec/blob/master/layer.md#non-distributable-layers

func (MediaType) IsImage added in v0.2.0

func (m MediaType) IsImage() bool

IsImage returns true if the mediaType represents an image manifest, as opposed to something else, like an index.

func (MediaType) IsIndex added in v0.2.0

func (m MediaType) IsIndex() bool

IsIndex returns true if the mediaType represents an index, as opposed to something else, like an image.

func (MediaType) IsLayer added in v0.15.0

func (m MediaType) IsLayer() bool

func (MediaType) IsSchema1 added in v0.15.0

func (m MediaType) IsSchema1() bool

Jump to

Keyboard shortcuts

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