registry

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

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

This section is empty.

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)
}

Registry defines the Registry interface

func New

func New(opts *ctlimg.Opts) (Registry, error)

New instantiates a new Registry

Jump to

Keyboard shortcuts

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