Documentation ¶
Overview ¶
Package v1 contains the public API version 1 used by other tools to interact with imgpkg
Index ¶
- func OptsFromEnv(base registry.Opts, readEnv func(string) (string, bool)) registry.Opts
- type Author
- type BundleInfo
- type Content
- type DescribeOpts
- type Description
- type ErrIsBundle
- type ErrIsNotBundle
- type ImageInfo
- 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 ¶
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 DescribeOpts ¶
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 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)
}
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