imageresolver

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageResolver

type ImageResolver interface {
	// ResolveImageReference will use the image resolver to map an image reference
	// to the image's SHA256 value from the registry.
	ResolveImageReference(imageReference string) (string, error)
}

ImageResolve implements a method of identifying an image reference.

func GetResolver added in v0.0.2

func GetResolver(resolver ResolverOption, args map[string]string) (ImageResolver, error)

type ResolverOption added in v0.0.2

type ResolverOption string
const (
	ResolverSkopeo ResolverOption = "skopeo"
	ResolverScript ResolverOption = "script"
)

func (*ResolverOption) String added in v0.0.2

func (opt *ResolverOption) String() string

type ResolverOptions added in v0.0.2

type ResolverOptions []ResolverOption

func GetResolverOptions added in v0.0.2

func GetResolverOptions() ResolverOptions

func (ResolverOptions) String added in v0.0.2

func (opts ResolverOptions) String() string

type Script added in v0.0.2

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

Script supports using a script/executable as an image resolver. The script only needs to return the digest. Examples of custom resolvers can be found in the hack/resolvers folder on the repo.

func (*Script) ResolveImageReference added in v0.0.2

func (custom *Script) ResolveImageReference(imageReference string) (string, error)

type Skopeo

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

Skopeo is the default image resolver using skopeo.

func NewSkopeoResolver

func NewSkopeoResolver(skopeoPath, authFile string) (*Skopeo, error)

NewSkopeoResolver returns the skopeo resolver setting the exec filepath and the authfile used by skopeo.

func (*Skopeo) ResolveImageReference

func (skopeo *Skopeo) ResolveImageReference(imageReference string) (string, error)

ResolveImageReference will use the image resolver to map an image reference to the image's SHA256 value from the registry.

Jump to

Keyboard shortcuts

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