imgpkg

package
v0.81.1 Latest Latest
Warning

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

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

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