oci

package
v1.1.1-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

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.

Jump to

Keyboard shortcuts

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