v1

package
v0.31.5 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1 contains the Public API to use imgpkg as a library

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 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 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 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 Status

type Status struct {
	BundleInfo
	IsBundle  bool `json:"-"`
	Cacheable bool `json:"cacheable"`
}

Status Report from the Pull command

func Pull

func Pull(imageRef string, outputPath string, pullOptions PullOpts, registryOpts registry.Opts) (Status, 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) (Status, 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

Jump to

Keyboard shortcuts

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