Documentation
¶
Overview ¶
Package registry defines a Registry interface and client for working for imkpkg images.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRegistryTrustedRootCertsFileForWindows ¶ added in v0.90.0
func AddRegistryTrustedRootCertsFileForWindows(registryCertOpts *RegistryCertOptions) error
AddRegistryTrustedRootCertsFileForWindows adds CA certificate to registry options for Windows environments
func GetRegistryName ¶ added in v0.90.0
GetRegistryName extracts the registry name from the image name with/without image tag (e.g. localhost:9876/tanzu-cli/plugins/central:small => localhost:9876)
Types ¶
type Registry ¶
type Registry interface {
// ListImageTags lists all tags of the given image.
ListImageTags(imageName string) ([]string, error)
// GetFile gets the file content bundled in the given image:tag.
// If filename is empty, it will get the first file.
GetFile(imageWithTag string, filename string) ([]byte, error)
// GetFiles get all the files content bundled in the given image:tag.
GetFiles(imageWithTag string) (map[string][]byte, error)
// DownloadBundle downloads OCI bundle similar to `imgpkg pull -b` command
// It is recommended to use this function when downloading imgpkg bundle
DownloadBundle(imageName, outputDir string) error
// DownloadImage downloads an OCI image similarly to the `imgpkg pull -i` command
DownloadImage(imageName, outputDir string) error
// GetImageDigest gets the digest of an OCI image similar to the `imgpkg tag resolve -i` command
GetImageDigest(imageWithTag string) (string, string, error)
// CopyImageToTar downloads the image as tar file
// This is equivalent to `imgpkg copy --image <image> --to-tar <tar-file-path>` command
CopyImageToTar(sourceImageName, destTarFile string) error
// CopyImageFromTar publishes the image to destination repository from specified tar file
// This is equivalent to `imgpkg copy --tar <file> --to-repo <dest-repo>` command
CopyImageFromTar(sourceTarFile, destImageRepo string) error
// PushImage publishes the image to the specified location
// This is equivalent to `imgpkg push -i <image> -f <filepath>`
PushImage(imageWithTag string, filePaths []string) error
}
Registry defines the Registry interface
type RegistryCertOptions ¶
func GetRegistryCertOptions ¶ added in v0.90.0
func GetRegistryCertOptions(registryHost string) (*RegistryCertOptions, error)
Click to show internal directories.
Click to hide internal directories.