package types

import "github.com/google/go-containerregistry/pkg/v1/types"

Index

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"
	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) 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

Source Files

types.go

Version
v0.1.1
Published
Jun 11, 2020
Platform
js/wasm
Last checked
2 hours ago

Tools for package owners.