Documentation ¶
Overview ¶
Package v1 contains the public API version 1 used by other tools to interact with imgpkg
Index ¶
- func CopyToRepository(origin CopyOrigin, repository string, opts CopyOpts, reg registry.Registry) (*ctlimgset.ProcessedImages, error)
- func CopyToTar(origin CopyOrigin, outputTarPath string, opts CopyOpts, reg registry.Registry) (*imagedesc.ImageRefDescriptors, error)
- func IsRootBundle(img ImageLabels) bool
- func OptsFromEnv(base registry.Opts, readEnv func(string) (string, bool)) registry.Opts
- type Author
- type BundleInfo
- type Content
- type CopyOpts
- type CopyOrigin
- type DescribeOpts
- type Description
- type ErrIsBundle
- type ErrIsNotBundle
- type ImageInfo
- type ImageLabels
- type ImagesLockInfo
- type Layers
- type Logger
- type Metadata
- type PullOpts
- type PullStatus
- func Pull(imageRef string, outputPath string, pullOptions PullOpts, ...) (PullStatus, error)
- func PullRecursive(imageRef string, outputPath string, pullOptions PullOpts, ...) (PullStatus, error)
- func PullRecursiveWithRegistry(imageRef string, outputPath string, pullOptions PullOpts, ...) (PullStatus, error)
- func PullWithRegistry(imageRef string, outputPath string, pullOptions PullOpts, ...) (PullStatus, error)
- type SignatureFetcher
- type Status
- type TagInfo
- type TagsInfo
- type Website
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyToRepository ¶ added in v0.43.0
func CopyToRepository(origin CopyOrigin, repository string, opts CopyOpts, reg registry.Registry) (*ctlimgset.ProcessedImages, error)
CopyToRepository copy origin image/s to a repository in a remote registry
func CopyToTar ¶ added in v0.43.0
func CopyToTar(origin CopyOrigin, outputTarPath string, opts CopyOpts, reg registry.Registry) (*imagedesc.ImageRefDescriptors, error)
CopyToTar copy origin image/s to a tar file in disc
func IsRootBundle ¶ added in v0.43.0
func IsRootBundle(img ImageLabels) bool
IsRootBundle check if a particular bundle is a root bundle or a inner bundle
Types ¶
type BundleInfo ¶
type BundleInfo struct { ImageRef string `json:"image"` ImagesLock *ImagesLockInfo `json:"imagesLock,omitempty"` NestedBundles []BundleInfo `json:"nestedBundles,omitempty"` }
BundleInfo Information related to the specific bundle
type Content ¶
type Content struct { Bundles map[string]Description `json:"bundles,omitempty"` Images map[string]ImageInfo `json:"images,omitempty"` }
Content Contents present in a Bundle
type CopyOpts ¶ added in v0.43.0
type CopyOpts struct { Logger Logger ImageSet ctlimgset.ImageSet TarImageSet ctlimgset.TarImageSet Concurrency int SignatureRetriever SignatureFetcher IncludeNonDistributable bool Resume bool }
CopyOpts Option that can be provided to the copy request
type CopyOrigin ¶ added in v0.43.0
CopyOrigin abstracts the original location to copy from
type DescribeOpts ¶
type DescribeOpts struct { Logger bundle.Logger Concurrency int IncludeCosignArtifacts bool Layers bool }
DescribeOpts Options used when calling the Describe function
type Description ¶
type Description struct { Image string `json:"image"` Origin string `json:"origin"` Annotations map[string]string `json:"annotations,omitempty"` Metadata Metadata `json:"metadata,omitempty"` Content Content `json:"content"` Layers []Layers `json:"layers,omitempty"` }
Description Metadata and Contents of a Bundle
func Describe ¶
func Describe(bundleImage string, opts DescribeOpts, registryOpts registry.Opts) (Description, error)
Describe Given a Bundle URL fetch the information about the contents of the Bundle and Nested Bundles
func DescribeWithRegistryAndSignatureFetcher ¶
func DescribeWithRegistryAndSignatureFetcher(bundleImage string, opts DescribeOpts, reg bundle.ImagesMetadata, sigFetcher SignatureFetcher) (Description, error)
DescribeWithRegistryAndSignatureFetcher Given a Bundle URL fetch the information about the contents of the Bundle and Nested Bundles
type ErrIsBundle ¶
type ErrIsBundle struct{}
ErrIsBundle Error when the provided Image Reference is a Bundle
func (ErrIsBundle) Is ¶
func (e ErrIsBundle) Is(target error) bool
Is check if the error is of the type ErrIsBundle
type ErrIsNotBundle ¶
type ErrIsNotBundle struct{}
ErrIsNotBundle Error when the provided Image Reference is not a Bundle
func (ErrIsNotBundle) Is ¶
func (e ErrIsNotBundle) Is(target error) bool
Is check if the error is of the type ErrIsNotBundle
type ImageInfo ¶
type ImageInfo struct { Image string `json:"image,omitempty"` Origin string `json:"origin,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` ImageType bundle.ImageType `json:"imageType"` Error string `json:"error,omitempty"` Layers []Layers `json:"layers,omitempty"` }
ImageInfo URLs where the image can be found as well as annotations provided in the Images Lock
type ImageLabels ¶ added in v0.43.0
ImageLabels used to retrieve the value of a label from an image
type ImagesLockInfo ¶
ImagesLockInfo Information about the ImagesLock file
type Layers ¶ added in v0.40.0
type Layers struct {
Digest string `json:"digest,omitempty"`
}
Layers image layers info
type Logger ¶
type Logger interface { Errorf(msg string, args ...interface{}) Warnf(msg string, args ...interface{}) Debugf(msg string, args ...interface{}) Tracef(msg string, args ...interface{}) Logf(msg string, args ...interface{}) }
Logger Interface used for logging
type Metadata ¶
type Metadata struct { Metadata map[string]string `json:"metadata,omitempty"` Authors []Author `json:"authors,omitempty"` Websites []Website `json:"websites,omitempty"` }
Metadata Extra metadata present in a Bundle
type PullOpts ¶
type PullOpts struct { Logger Logger // AsImage Pull the contents of the OCI Image AsImage bool // IsBundle the image being pulled is a Bundle IsBundle bool }
PullOpts Option that can be provided to the pull request
type PullStatus ¶
type PullStatus struct { BundleInfo IsBundle bool `json:"-"` Cacheable bool `json:"cacheable"` }
PullStatus Report from the Pull command
func Pull ¶
func Pull(imageRef string, outputPath string, pullOptions PullOpts, registryOpts registry.Opts) (PullStatus, error)
Pull Download the contents of the image referenced by imageRef to the folder outputPath
func PullRecursive ¶
func PullRecursive(imageRef string, outputPath string, pullOptions PullOpts, registryOpts registry.Opts) (PullStatus, error)
PullRecursive Downloads the contents of the Bundle and Nested Bundles referenced by imageRef to the folder outputPath. This functions should error out when imageRef does not point to a Bundle
func PullRecursiveWithRegistry ¶
func PullRecursiveWithRegistry(imageRef string, outputPath string, pullOptions PullOpts, reg registry.Registry) (PullStatus, error)
PullRecursiveWithRegistry Downloads the contents of the Bundle and Nested Bundles referenced by imageRef to the folder outputPath. This functions should error out when imageRef does not point to a Bundle
func PullWithRegistry ¶
func PullWithRegistry(imageRef string, outputPath string, pullOptions PullOpts, reg registry.Registry) (PullStatus, error)
PullWithRegistry Download the contents of the image referenced by imageRef to the folder outputPath
type SignatureFetcher ¶
type SignatureFetcher interface { FetchForImageRefs(images []lockconfig.ImageRef) ([]lockconfig.ImageRef, error) Fetch(images *imageset.UnprocessedImageRefs) (*imageset.UnprocessedImageRefs, error) }
SignatureFetcher Interface to retrieve signatures associated with Images
type Status ¶
type Status PullStatus
Status Report from the Pull command Deprecated: in favor of PullStatus, the name makes more sense for API.
type TagInfo ¶
TagInfo Contains the tag name and the digest associated with the tag TagInfo.Digest might be empty if caller ask for it not to be retrieved