Documentation ¶
Index ¶
- func IsNotAnImageError(err error) bool
- type Contents
- type ImagesDescriptor
- type ImagesWriter
- type Logger
- type PlainImage
- func (i *PlainImage) Digest() string
- func (i *PlainImage) DigestRef() string
- func (i *PlainImage) Fetch() (regv1.Image, error)
- func (i *PlainImage) IsImage() (bool, error)
- func (i *PlainImage) Pull(outputPath string, logger Logger) error
- func (i *PlainImage) Repo() string
- func (i *PlainImage) Tag() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotAnImageError ¶
Types ¶
type Contents ¶
type Contents struct {
// contains filtered or unexported fields
}
Contents of the OCI Image
func NewContents ¶
NewContents creates the struct that represent an OCI Image based on the provided paths
type ImagesDescriptor ¶
type ImagesDescriptor interface {
Get(regname.Reference) (*regremote.Descriptor, error)
}
type ImagesWriter ¶
type ImagesWriter interface { WriteImage(regname.Reference, regv1.Image, chan regv1.Update) error WriteTag(ref regname.Tag, taggagle regremote.Taggable) error }
ImagesWriter defines the needed functions to write to the registry
type PlainImage ¶
type PlainImage struct {
// contains filtered or unexported fields
}
PlainImage struct that represents an OCI Image
func NewFetchedPlainImageWithTag ¶
func NewFetchedPlainImageWithTag(digestRef string, tag string, fetchedImage regv1.Image) *PlainImage
NewFetchedPlainImageWithTag creates the struct that represents the OCI Image reference by the fetchedImage This function should only be used after an initial retrieval of information from registry
func NewPlainImage ¶
func NewPlainImage(ref string, imgDescriptor ImagesDescriptor) *PlainImage
NewPlainImage creates the struct that represents the OCI Image referenced by ref
func (*PlainImage) DigestRef ¶
func (i *PlainImage) DigestRef() string
DigestRef Image full location including registry, repository and digest
func (*PlainImage) Fetch ¶
func (i *PlainImage) Fetch() (regv1.Image, error)
Fetch the information about the referenced image
func (*PlainImage) IsImage ¶
func (i *PlainImage) IsImage() (bool, error)
IsImage checks if the provided reference is an OCI Image
func (*PlainImage) Pull ¶
func (i *PlainImage) Pull(outputPath string, logger Logger) error
Pull the OCI Image to disk
func (*PlainImage) Repo ¶
func (i *PlainImage) Repo() string
Repo Repository where the image is stored
func (*PlainImage) Tag ¶
func (i *PlainImage) Tag() string
Tag of the image or "" if the image is referenced by digest