v1

package
v0.33.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package v1 contains the public API version 1 used by other tools to interact with imgpkg

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OptsFromEnv added in v0.33.1

func OptsFromEnv(base registry.Opts, readEnv func(string) (string, bool)) registry.Opts

OptsFromEnv Using the base Opts fills up the missing information using the environment variables

Types

type Author added in v0.32.0

type Author struct {
	Name  string `json:"name,omitempty"`
	Email string `json:"email,omitempty"`
}

Author information from a Bundle

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 added in v0.32.0

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 added in v0.32.0

type DescribeOpts struct {
	Logger                 bundle.Logger
	Concurrency            int
	IncludeCosignArtifacts bool
}

DescribeOpts Options used when calling the Describe function

type Description added in v0.32.0

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"`
}

Description Metadata and Contents of a Bundle

func Describe added in v0.32.0

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 added in v0.32.0

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) Error

func (e ErrIsBundle) Error() string

Error message

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) Error

func (e ErrIsNotBundle) Error() string

Error message

func (ErrIsNotBundle) Is

func (e ErrIsNotBundle) Is(target error) bool

Is check if the error is of the type ErrIsNotBundle

type ImageInfo added in v0.32.0

type ImageInfo struct {
	Image       string            `json:"image"`
	Origin      string            `json:"origin"`
	Annotations map[string]string `json:"annotations,omitempty"`
	ImageType   bundle.ImageType  `json:"imageType"`
}

ImageInfo URLs where the image can be found as well as annotations provided in the Images Lock

type ImagesLockInfo

type ImagesLockInfo struct {
	Path    string `json:"path"`
	Updated bool   `json:"updated"`
}

ImagesLockInfo Information about the ImagesLock file

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 added in v0.32.0

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 added in v0.32.0

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

type SignatureFetcher added in v0.32.0

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 added in v0.33.0

type TagInfo struct {
	Tag    string
	Digest string
}

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

type TagsInfo added in v0.33.0

type TagsInfo struct {
	Repository string
	Tags       []TagInfo
}

TagsInfo Contains all the tags associated with the repository on Image

func TagList added in v0.33.0

func TagList(imageRef string, getDigests bool, registryOpts registry.Opts) (TagsInfo, error)

TagList Retrieve all the tags associated with a repository imageRef contains the address for the repository getDigests when set to true, provides

type Website added in v0.32.0

type Website struct {
	URL string `json:"url,omitempty"`
}

Website URL where more information of the Bundle can be found

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL