Documentation
¶
Index ¶
- Constants
- Variables
- func SplitImageRefByRepoAndTag(imageReferenceString string) (repo, tag string)
- type Image
- type ImageLayout
- func (l *ImageLayout) AddImage(img pkg.RegistryImage, tag string) error
- func (l *ImageLayout) GetImage(tag string) (pkg.RegistryImage, error)
- func (l *ImageLayout) GetMeta(tag string) (*ImageMeta, error)
- func (l *ImageLayout) Path() layout.Path
- func (l *ImageLayout) TagImage(imageDigest v1.Hash, tag string) error
- type ImageMeta
- type ImageOption
Constants ¶
View Source
const ( AnnotationImageReferenceName = "org.opencontainers.image.ref.name" AnnotationImageShortTag = "io.deckhouse.image.short_tag" )
Variables ¶
View Source
var ErrImageMetaNotFound = fmt.Errorf("image metadata not found")
Functions ¶
Types ¶
type Image ¶
func (*Image) Extract ¶
func (i *Image) Extract() io.ReadCloser
Extract flattens the image to a single layer and returns ReadCloser for fetching the content The repository is determined by the chained WithSegment() calls
func (*Image) GetDigestReference ¶
func (*Image) GetTagReference ¶
func (*Image) SetMetadata ¶
type ImageLayout ¶
type ImageLayout struct {
// contains filtered or unexported fields
}
func NewImageLayout ¶
func NewImageLayout(path layout.Path) *ImageLayout
func (*ImageLayout) AddImage ¶
func (l *ImageLayout) AddImage(img pkg.RegistryImage, tag string) error
func (*ImageLayout) GetImage ¶
func (l *ImageLayout) GetImage(tag string) (pkg.RegistryImage, error)
func (*ImageLayout) Path ¶
func (l *ImageLayout) Path() layout.Path
type ImageMeta ¶
func NewImageMeta ¶
func (*ImageMeta) GetDigestReference ¶
func (*ImageMeta) GetTagReference ¶
type ImageOption ¶
type ImageOption func(img *Image)
func WithFetchingMetadata ¶
func WithFetchingMetadata(tagReference string) ImageOption
WithFetchingMetadata enables fetching and filling image metadata (digest, digest reference) during NewImage call
func WithMetadata ¶
func WithMetadata(metadata *ImageMeta) ImageOption
Click to show internal directories.
Click to hide internal directories.