image

package
v0.17.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const LayoutKind = "layout"
View Source
const LocalKind = "docker"
View Source
const RemoteKind = "remote"

Variables

This section is empty.

Functions

func DecodeLabel added in v0.13.1

func DecodeLabel(image imgutil.Image, label string, v interface{}) error

func FromLayoutPath added in v0.17.0

func FromLayoutPath(parentPath string) (v1.Image, string, error)

FromLayoutPath takes a path to a directory (such as <layers>/extended/run) containing a single image in "sparse" OCI layout format, and returns a v1.Image along with the path of the image (such as <layers>/extended/run/sha256:<sha256>) or an error if the image cannot be loaded. The path is helpful for locating the image when we only know the digest of the config, such as for local images.

func SyncLabels added in v0.13.1

func SyncLabels(sourceImg imgutil.Image, destImage imgutil.Image, test func(string) bool) error

Types

type Handler added in v0.17.0

type Handler interface {
	InitImage(imageRef string) (imgutil.Image, error)
	Kind() string
}

func NewHandler added in v0.17.0

func NewHandler(docker client.CommonAPIClient, keychain authn.Keychain, layoutDir string, useLayout bool) Handler

NewHandler creates a new Handler according to the arguments provided, following these rules: - WHEN layoutDir is defined and useLayout is true then it returns a LayoutHandler - WHEN a docker client is provided then it returns a LocalHandler - WHEN an auth.Keychain is provided then it returns a RemoteHandler - Otherwise nil is returned

type LayoutHandler added in v0.17.0

type LayoutHandler struct {
	// contains filtered or unexported fields
}

func (*LayoutHandler) InitImage added in v0.17.0

func (h *LayoutHandler) InitImage(imageRef string) (imgutil.Image, error)

func (*LayoutHandler) Kind added in v0.17.0

func (h *LayoutHandler) Kind() string

type LocalHandler added in v0.17.0

type LocalHandler struct {
	// contains filtered or unexported fields
}

func (*LocalHandler) InitImage added in v0.17.0

func (h *LocalHandler) InitImage(imageRef string) (imgutil.Image, error)

func (*LocalHandler) Kind added in v0.17.0

func (h *LocalHandler) Kind() string

type RemoteHandler added in v0.17.0

type RemoteHandler struct {
	// contains filtered or unexported fields
}

func (*RemoteHandler) InitImage added in v0.17.0

func (h *RemoteHandler) InitImage(imageRef string) (imgutil.Image, error)

func (*RemoteHandler) Kind added in v0.17.0

func (h *RemoteHandler) Kind() string

Jump to

Keyboard shortcuts

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