imgpkg

package
v0.83.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package imgpkg implements helper function for imgpkg cli

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImgpkgOptions

type ImgpkgOptions struct{}

ImgpkgOptions implements the ImgpkgWrapper interface by using `imgpkg` binary internally

func (*ImgpkgOptions) CopyArchiveToRepo

func (io *ImgpkgOptions) CopyArchiveToRepo(imageRepo, archivePath string) error

CopyArchiveToRepo invokes `imgpkg copy --tar <archivePath> --to-repo <imageRepo>` command

func (*ImgpkgOptions) CopyImageToArchive

func (io *ImgpkgOptions) CopyImageToArchive(image, archivePath string) error

CopyImageToArchive invokes `imgpkg copy -i <image> --to-tar <archivePath>` command

func (*ImgpkgOptions) GetFileDigestFromImage

func (io *ImgpkgOptions) GetFileDigestFromImage(image, fileName string) (string, error)

GetFileDigestFromImage invokes `PullImage` to fetch the image and returns the digest of the specified file

func (*ImgpkgOptions) PullImage

func (io *ImgpkgOptions) PullImage(image, dirPath string) error

PullImage invokes `imgpkg pull -i <image> -o <dirPath>` command

func (*ImgpkgOptions) PushImage

func (io *ImgpkgOptions) PushImage(image, filePath string) error

PushImage invokes `imgpkg push -i <image> -f <filepath>` command

func (*ImgpkgOptions) ResolveImage

func (io *ImgpkgOptions) ResolveImage(image string) error

ResolveImage invokes `imgpkg tag resolve -i <image>` command

type ImgpkgWrapper

type ImgpkgWrapper interface {
	// ResolveImage invokes `imgpkg tag resolve -i <image>` command
	ResolveImage(image string) error
	// PushImage invokes `imgpkg push -i <image> -f <filepath>` command
	PushImage(image, filePath string) error
	// PullImage invokes `imgpkg pull -i <image> -o <dirPath>` command
	PullImage(image, dirPath string) error
	// CopyArchiveToRepo invokes `imgpkg copy --tar <archivePath> --to-repo <imageRepo>` command
	CopyArchiveToRepo(imageRepo, archivePath string) error
	// CopyImageToArchive invokes `imgpkg copy -i <image> --to-tar <archivePath>` command
	CopyImageToArchive(image, archivePath string) error
	// GetFileDigestFromImage invokes `PullImage` to fetch the image and returns the digest of the specified file
	GetFileDigestFromImage(image, fileName string) (string, error)
}

ImgpkgWrapper defines the imgpkg command wrapper functions

func NewImgpkgCLIWrapper

func NewImgpkgCLIWrapper() ImgpkgWrapper

NewImgpkgCLIWrapper creates new ImgpkgWrapper instance

Jump to

Keyboard shortcuts

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