Documentation ¶
Overview ¶
Package imagedesc defines the description of image, indexes and layers used by go-containerregistry
Index ¶
- type ConfigDescriptor
- type DescribedCompressedLayer
- func (l DescribedCompressedLayer) Compressed() (io.ReadCloser, error)
- func (l DescribedCompressedLayer) DiffID() (regv1.Hash, error)
- func (l DescribedCompressedLayer) Digest() (regv1.Hash, error)
- func (l DescribedCompressedLayer) MediaType() (types.MediaType, error)
- func (l DescribedCompressedLayer) Size() (int64, error)
- func (l DescribedCompressedLayer) Uncompressed() (io.ReadCloser, error)
- type DescribedImage
- func (i DescribedImage) ConfigFile() (*regv1.ConfigFile, error)
- func (i DescribedImage) ConfigName() (regv1.Hash, error)
- func (i DescribedImage) Digest() (regv1.Hash, error)
- func (i DescribedImage) LayerByDiffID(diffID regv1.Hash) (regv1.Layer, error)
- func (i DescribedImage) LayerByDigest(digest regv1.Hash) (regv1.Layer, error)
- func (i DescribedImage) Layers() ([]regv1.Layer, error)
- func (i DescribedImage) Manifest() (*regv1.Manifest, error)
- func (i DescribedImage) MediaType() (types.MediaType, error)
- func (i DescribedImage) RawConfigFile() ([]byte, error)
- func (i DescribedImage) RawManifest() ([]byte, error)
- func (i DescribedImage) Ref() string
- func (i DescribedImage) Size() (int64, error)
- func (i DescribedImage) Tag() string
- type DescribedImageIndex
- func (i DescribedImageIndex) Digest() (regv1.Hash, error)
- func (i DescribedImageIndex) Image(digest regv1.Hash) (regv1.Image, error)
- func (i DescribedImageIndex) ImageIndex(digest regv1.Hash) (regv1.ImageIndex, error)
- func (i DescribedImageIndex) Images() []regv1.Image
- func (i DescribedImageIndex) IndexManifest() (*regv1.IndexManifest, error)
- func (i DescribedImageIndex) Indexes() []regv1.ImageIndex
- func (i DescribedImageIndex) MediaType() (types.MediaType, error)
- func (i DescribedImageIndex) RawManifest() ([]byte, error)
- func (i DescribedImageIndex) Ref() string
- func (i DescribedImageIndex) Size() (int64, error)
- func (i DescribedImageIndex) Tag() string
- type DescribedReader
- type ImageDescriptor
- type ImageIndexDescriptor
- type ImageIndexWithRef
- type ImageLayerDescriptor
- type ImageOrImageIndexDescriptor
- type ImageOrIndex
- type ImageRefDescriptors
- type ImageWithRef
- type LayerContents
- type LayerProvider
- type ManifestDescriptor
- type Metadata
- type Registry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigDescriptor ¶
type DescribedCompressedLayer ¶
type DescribedCompressedLayer struct {
// contains filtered or unexported fields
}
DescribedCompressedLayer Represents a Layer that is part of a Tar file generated by imgpkg
func NewDescribedCompressedLayer ¶
func NewDescribedCompressedLayer(desc ImageLayerDescriptor, contents LayerContents) DescribedCompressedLayer
NewDescribedCompressedLayer Builds DescribedCompressedLayer struct
func (DescribedCompressedLayer) Compressed ¶
func (l DescribedCompressedLayer) Compressed() (io.ReadCloser, error)
Compressed returns a reader for the Layer anv validates the Digest of the layer matches
func (DescribedCompressedLayer) DiffID ¶
func (l DescribedCompressedLayer) DiffID() (regv1.Hash, error)
DiffID returns the DiffID of the layer
func (DescribedCompressedLayer) Digest ¶
func (l DescribedCompressedLayer) Digest() (regv1.Hash, error)
Digest returns the Digest of the layer
func (DescribedCompressedLayer) MediaType ¶
func (l DescribedCompressedLayer) MediaType() (types.MediaType, error)
MediaType returns the Media Type of the layer
func (DescribedCompressedLayer) Size ¶
func (l DescribedCompressedLayer) Size() (int64, error)
Size returns the size of the Layer
func (DescribedCompressedLayer) Uncompressed ¶
func (l DescribedCompressedLayer) Uncompressed() (io.ReadCloser, error)
Uncompressed returns a reader for the Layer uncompressed
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 ¶
LayerByDiffID is an analog to LayerByDigest, looking up by "diff id" (the uncompressed hash).
func (DescribedImage) LayerByDigest ¶
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) ImageIndex ¶
func (i DescribedImageIndex) ImageIndex(digest regv1.Hash) (regv1.ImageIndex, error)
ImageIndex retrieve the index that matches the provided digest
func (DescribedImageIndex) Images ¶
func (i DescribedImageIndex) Images() []regv1.Image
Images retrieve all images associated with the described image
func (DescribedImageIndex) IndexManifest ¶
func (i DescribedImageIndex) IndexManifest() (*regv1.IndexManifest, error)
func (DescribedImageIndex) Indexes ¶
func (i DescribedImageIndex) Indexes() []regv1.ImageIndex
Indexes retrieve all indexes associated with the described image
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 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 OrigRef 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 OrigRef 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 ¶
func (ImageLayerDescriptor) IsDistributable ¶
func (td ImageLayerDescriptor) IsDistributable() bool
type ImageOrImageIndexDescriptor ¶
type ImageOrImageIndexDescriptor struct { ImageIndex *ImageIndexDescriptor Image *ImageDescriptor }
func (ImageOrImageIndexDescriptor) OrigRef ¶
func (td ImageOrImageIndexDescriptor) OrigRef() string
OrigRef returns ImagesLock's image value of an Image or an ImageIndex
func (ImageOrImageIndexDescriptor) SortKey ¶
func (td ImageOrImageIndexDescriptor) SortKey() string
type ImageOrIndex ¶
type ImageOrIndex struct { Image *ImageWithRef Index *ImageIndexWithRef Labels map[string]string OrigRef string }
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 LayerContents ¶
type LayerContents interface {
Open() (io.ReadCloser, error)
}
type LayerProvider ¶
type LayerProvider interface {
FindLayer(ImageLayerDescriptor) (LayerContents, error)
}