Documentation
¶
Index ¶
Constants ¶
const ( // name of this format OciLayoutFormatName = "oci-layout" // name of directory that receives data in this format within dest OciLayoutDirName = "oci" // name of special marker file written to signify a legacy image OciLayoutSingleImageDigestFileName = "single-image-digest" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Check ¶ added in v1.0.0
type Check struct {
// contains filtered or unexported fields
}
type ImageMetadata ¶
type IndexOrImage ¶ added in v1.11.0
type IndexOrImage struct { // image index object, wraps all child images v1.ImageIndex // contains filtered or unexported fields }
represents either an ImageIndex (modern image) or a legacy image wrapped by an otherwise empty ImageIndex
func NewIndexImageFromImage ¶ added in v1.11.0
func NewIndexImageFromImage(img v1.Image) (*IndexOrImage, error)
create new legacy-style IndexOrImage based on a v1.Image which may have been read from a tarball, or otherwise referenced directly
func NewIndexImageFromPath ¶ added in v1.11.0
func NewIndexImageFromPath(path string) (*IndexOrImage, error)
create new IndexOrImage based on loading from a directory on disk directory must incldue the file "oci-layout" (as required by the spec) as a special-case, if the "single-image-digest" marker file is present, then ignore any other images and wrap that as a single image.
func NewIndexImageFromRemote ¶ added in v1.11.0
func NewIndexImageFromRemote(imgOrIndex *remote.Descriptor) (*IndexOrImage, error)
create new IndexOrImage based on a remote descriptor, which may be either a modern index of images, or a specific legacy image.
func (*IndexOrImage) Digest ¶ added in v1.11.0
func (ioi *IndexOrImage) Digest() (v1.Hash, error)
return the digest for this index (or image)
func (*IndexOrImage) ForEachImage ¶ added in v1.11.0
func (ioi *IndexOrImage) ForEachImage(f func(v1.Image) error) error
iterate through each image inside of this IndexOrImage and call the specified callback
func (*IndexOrImage) Taggable ¶ added in v1.11.0
func (ioi *IndexOrImage) Taggable() (remote.Taggable, error)
return the object that should be tagged when pushing to a repo
func (*IndexOrImage) WriteToPath ¶ added in v1.11.0
func (ioi *IndexOrImage) WriteToPath(dest string) error
write out all assets in OCI Layout to the path specified. in addition to standard files, a special marker file is written if this object is based on a legacy specific image. The OCI Layout specification permits additional files to be present.
type Out ¶ added in v1.0.0
type Out struct {
// contains filtered or unexported fields
}
type TagVersion ¶ added in v1.0.0
type TagVersions ¶ added in v1.0.0
type TagVersions []TagVersion
func (TagVersions) Len ¶ added in v1.0.0
func (vs TagVersions) Len() int
func (TagVersions) Less ¶ added in v1.0.0
func (vs TagVersions) Less(i, j int) bool
func (TagVersions) Swap ¶ added in v1.0.0
func (vs TagVersions) Swap(i, j int)