imagedesc

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigDescriptor

type ConfigDescriptor struct {
	Digest string
	Raw    string
}

type DescribedImage

type DescribedImage struct {
	// contains filtered or unexported fields
}

func NewDescribedImage

func NewDescribedImage(desc ImageDescriptor, layerProvider LayerProvider) DescribedImage

func (DescribedImage) ConfigFile

func (i DescribedImage) ConfigFile() (*regv1.ConfigFile, error)

ConfigFile returns this image's config file.

func (DescribedImage) ConfigName

func (i DescribedImage) ConfigName() (regv1.Hash, error)

ConfigName returns the hash of the image's config file.

func (DescribedImage) Digest

func (i DescribedImage) Digest() (regv1.Hash, error)

Digest returns the sha256 of this image's manifest.

func (DescribedImage) LayerByDiffID

func (i DescribedImage) LayerByDiffID(diffID regv1.Hash) (regv1.Layer, error)

LayerByDiffID is an analog to LayerByDigest, looking up by "diff id" (the uncompressed hash).

func (DescribedImage) LayerByDigest

func (i DescribedImage) LayerByDigest(digest regv1.Hash) (regv1.Layer, error)

LayerByDigest returns a Layer for interacting with a particular layer of the image, looking it up by "digest" (the compressed hash).

func (DescribedImage) Layers

func (i DescribedImage) Layers() ([]regv1.Layer, error)

Layers returns the ordered collection of filesystem layers that comprise this image. The order of the list is oldest/base layer first, and most-recent/top layer last.

func (DescribedImage) Manifest

func (i DescribedImage) Manifest() (*regv1.Manifest, error)

Manifest returns this image's Manifest object.

func (DescribedImage) MediaType

func (i DescribedImage) MediaType() (types.MediaType, error)

MediaType of this image's manifest.

func (DescribedImage) RawConfigFile

func (i DescribedImage) RawConfigFile() ([]byte, error)

RawConfigFile returns the serialized bytes of ConfigFile()

func (DescribedImage) RawManifest

func (i DescribedImage) RawManifest() ([]byte, error)

RawManifest returns the serialized bytes of Manifest()

func (DescribedImage) Ref

func (i DescribedImage) Ref() string

func (DescribedImage) Size

func (i DescribedImage) Size() (int64, error)

func (DescribedImage) Tag

func (i DescribedImage) Tag() string

type DescribedImageIndex

type DescribedImageIndex struct {
	// contains filtered or unexported fields
}

func NewDescribedImageIndex

func NewDescribedImageIndex(desc ImageIndexDescriptor,
	images []regv1.Image, indexes []regv1.ImageIndex) DescribedImageIndex

func (DescribedImageIndex) Digest

func (i DescribedImageIndex) Digest() (regv1.Hash, error)

func (DescribedImageIndex) Image

func (i DescribedImageIndex) Image(digest regv1.Hash) (regv1.Image, error)

func (DescribedImageIndex) ImageIndex

func (i DescribedImageIndex) ImageIndex(digest regv1.Hash) (regv1.ImageIndex, error)

func (DescribedImageIndex) IndexManifest

func (i DescribedImageIndex) IndexManifest() (*regv1.IndexManifest, error)

func (DescribedImageIndex) MediaType

func (i DescribedImageIndex) MediaType() (types.MediaType, error)

func (DescribedImageIndex) RawManifest

func (i DescribedImageIndex) RawManifest() ([]byte, error)

func (DescribedImageIndex) Ref

func (i DescribedImageIndex) Ref() string

func (DescribedImageIndex) Size

func (i DescribedImageIndex) Size() (int64, error)

func (DescribedImageIndex) Tag

func (i DescribedImageIndex) Tag() string

type DescribedLayer

type DescribedLayer struct {
	// contains filtered or unexported fields
}

func NewDescribedLayer

func NewDescribedLayer(desc ImageLayerDescriptor, contents LayerContents) DescribedLayer

func (DescribedLayer) Compressed

func (l DescribedLayer) Compressed() (io.ReadCloser, error)

func (DescribedLayer) DiffID

func (l DescribedLayer) DiffID() (regv1.Hash, error)

func (DescribedLayer) Digest

func (l DescribedLayer) Digest() (regv1.Hash, error)

func (DescribedLayer) MediaType

func (l DescribedLayer) MediaType() (types.MediaType, error)

func (DescribedLayer) Size

func (l DescribedLayer) Size() (int64, error)

func (DescribedLayer) Uncompressed

func (l DescribedLayer) Uncompressed() (io.ReadCloser, error)

type DescribedReader

type DescribedReader struct {
	// contains filtered or unexported fields
}

func NewDescribedReader

func NewDescribedReader(ids *ImageRefDescriptors, layerProvider LayerProvider) DescribedReader

func (DescribedReader) Read

func (r DescribedReader) Read() []ImageOrIndex

type ImageDescriptor

type ImageDescriptor struct {
	Refs   []string
	Layers []ImageLayerDescriptor

	Config   ConfigDescriptor
	Manifest ManifestDescriptor
	Tag      string

	Labels map[string]string
}

func (ImageDescriptor) SortKey

func (td ImageDescriptor) SortKey() string

type ImageIndexDescriptor

type ImageIndexDescriptor struct {
	Refs    []string
	Images  []ImageDescriptor
	Indexes []ImageIndexDescriptor

	MediaType string
	Digest    string
	Raw       string
	Tag       string

	Labels map[string]string
}

func (ImageIndexDescriptor) SortKey

func (td ImageIndexDescriptor) SortKey() string

type ImageIndexWithRef

type ImageIndexWithRef interface {
	regv1.ImageIndex
	Ref() string
	Tag() string
}

type ImageLayerDescriptor

type ImageLayerDescriptor struct {
	MediaType string
	Digest    string
	DiffID    string
	Size      int64
}

func (ImageLayerDescriptor) IsDistributable

func (td ImageLayerDescriptor) IsDistributable() bool

type ImageOrImageIndexDescriptor

type ImageOrImageIndexDescriptor struct {
	ImageIndex *ImageIndexDescriptor
	Image      *ImageDescriptor
}

func (ImageOrImageIndexDescriptor) SortKey

func (td ImageOrImageIndexDescriptor) SortKey() string

type ImageOrIndex

type ImageOrIndex struct {
	Image *ImageWithRef
	Index *ImageIndexWithRef

	Labels map[string]string
}

func (ImageOrIndex) Digest

func (t ImageOrIndex) Digest() (regv1.Hash, error)

func (ImageOrIndex) Ref

func (t ImageOrIndex) Ref() string

func (ImageOrIndex) Tag

func (t ImageOrIndex) Tag() string

type ImageRefDescriptors

type ImageRefDescriptors struct {
	// contains filtered or unexported fields
}

func NewImageRefDescriptors

func NewImageRefDescriptors(refs []Metadata, registry Registry) (*ImageRefDescriptors, error)

func NewImageRefDescriptorsFromBytes

func NewImageRefDescriptorsFromBytes(data []byte) (*ImageRefDescriptors, error)

func (*ImageRefDescriptors) AsBytes

func (ids *ImageRefDescriptors) AsBytes() ([]byte, error)

func (*ImageRefDescriptors) Descriptors

func (ids *ImageRefDescriptors) Descriptors() []ImageOrImageIndexDescriptor

func (*ImageRefDescriptors) FindLayer

func (ids *ImageRefDescriptors) FindLayer(layerTD ImageLayerDescriptor) (LayerContents, error)

type ImageWithRef

type ImageWithRef interface {
	regv1.Image
	Ref() string
	Tag() string
}

type LayerContents

type LayerContents interface {
	Open() (io.ReadCloser, error)
}

type LayerProvider

type LayerProvider interface {
	FindLayer(ImageLayerDescriptor) (LayerContents, error)
}

type ManifestDescriptor

type ManifestDescriptor struct {
	MediaType string
	Digest    string
	Raw       string
}

type Metadata

type Metadata struct {
	Ref    regname.Reference
	Tag    string
	Labels map[string]string
}

type RegistryRemoteImage

type RegistryRemoteImage interface {
	Get(reference regname.Reference) (*remote.Descriptor, error)
}

Jump to

Keyboard shortcuts

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