Documentation ¶
Overview ¶
Package imgpkg implements helper function for imgpkg cli
Index ¶
- type ImgpkgOptions
- func (io *ImgpkgOptions) CopyArchiveToRepo(imageRepo, archivePath string) error
- func (io *ImgpkgOptions) CopyImageToArchive(image, archivePath string) error
- func (io *ImgpkgOptions) GetFileDigestFromImage(image, fileName string) (string, error)
- func (io *ImgpkgOptions) PullImage(image, dirPath string) error
- func (io *ImgpkgOptions) PushImage(image, filePath string) error
- func (io *ImgpkgOptions) ResolveImage(image string) error
- type ImgpkgWrapper
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