package oci

import "github.com/containerd/containerd/images/oci"

Package oci provides the importer and the exporter for OCI Image Spec.

Index

Functions

func GetChildrenDescriptors

func GetChildrenDescriptors(r io.Reader, desc ocispec.Descriptor) ([]ocispec.Descriptor, error)

GetChildrenDescriptors returns children blob descriptors for the following supported types: - images.MediaTypeDockerSchema2Manifest, ocispec.MediaTypeImageManifest - images.MediaTypeDockerSchema2ManifestList, ocispec.MediaTypeImageIndex

Types

type V1Exporter

type V1Exporter struct {
}

V1Exporter implements OCI Image Spec v1. It is up to caller to put "org.opencontainers.image.ref.name" annotation to desc.

TODO(AkihiroSuda): add V1Exporter{TranslateMediaTypes: true} that transforms media types,

e.g. application/vnd.docker.image.rootfs.diff.tar.gzip
     -> application/vnd.oci.image.layer.v1.tar+gzip

func (*V1Exporter) Export

func (oe *V1Exporter) Export(ctx context.Context, store content.Provider, desc ocispec.Descriptor, writer io.Writer) error

Export implements Exporter.

type V1Importer

type V1Importer struct {
	// ImageName is preprended to either `:` + OCI ref name or `@` + digest (for anonymous refs).
	// This field is mandatory atm, but may change in the future. maybe ref map[string]string as in moby/moby#33355
	ImageName string
}

V1Importer implements OCI Image Spec v1.

func (*V1Importer) Import

func (oi *V1Importer) Import(ctx context.Context, store content.Store, reader io.Reader) ([]images.Image, error)

Import implements Importer.

Source Files

exporter.go importer.go

Version
v1.1.2
Published
Jul 13, 2018
Platform
js/wasm
Imports
17 packages
Last checked
38 minutes ago

Tools for package owners.