image

package
v0.43.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GitRepoRemoteURLUnknown = "<unknown>"
	GitRepoHeadSHANoCommits = "<no commits>"
)

Variables

This section is empty.

Functions

func GitRedactedRemoteURL added in v0.41.0

func GitRedactedRemoteURL(url string) string

GitRedactedRemoteURL redacts any user/password information in the URL

func MatchesPlatformSelection added in v0.41.0

func MatchesPlatformSelection(given regv1.Platform, required ctlconf.PlatformSelection) bool

MatchesPlatformSelection checks if the given platform matches the required platforms. The given platform matches the required platform if - architecture and OS are identical. - OS version and variant are identical if provided. - features and OS features of the required platform are subsets of those of the given platform. Adapted from https://github.com/google/go-containerregistry/blob/570ba6c88a5041afebd4599981d849af96f5dba9/pkg/v1/remote/index.go#L263

func URLRepo added in v0.41.0

func URLRepo(url string) (string, bool)

Types

type BuiltImage

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

func NewBuiltImage

func NewBuiltImage(url string, buildSource ctlconf.Source, imgDst *ctlconf.ImageDestination,
	docker ctlbdk.Docker, dockerBuildx ctlbdk.Buildx, pack ctlbpk.Pack,
	kubectlBuildkit ctlbkb.KubectlBuildkit, ko ctlbko.Ko, bazel ctlbbz.Bazel) BuiltImage

func (BuiltImage) URL

func (i BuiltImage) URL() (string, []ctlconf.Origin, error)

type DigestedImage

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

func MaybeNewDigestedImage

func MaybeNewDigestedImage(url string) *DigestedImage

func NewDigestedImageFromParts

func NewDigestedImageFromParts(url, digest string) DigestedImage

func (DigestedImage) URL

func (i DigestedImage) URL() (string, []ctlconf.Origin, error)

type ErrImage added in v0.41.0

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

func NewErrImage added in v0.41.0

func NewErrImage(err error) ErrImage

func (ErrImage) URL added in v0.41.0

func (i ErrImage) URL() (string, []ctlconf.Origin, error)

type Factory

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

func NewFactory

func NewFactory(opts FactoryOpts, registry ctlreg.Registry, logger ctllog.Logger) Factory

func (Factory) New

func (f Factory) New(url string) Image

type FactoryOpts added in v0.41.0

type FactoryOpts struct {
	Conf                    ctlconf.Conf
	AllowedToBuild          bool
	GlobalPlatformSelection *ctlconf.PlatformSelection
}

type GitRepo added in v0.7.0

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

func NewGitRepo added in v0.7.0

func NewGitRepo(dirPath string) GitRepo

func (GitRepo) HeadSHA added in v0.7.0

func (r GitRepo) HeadSHA() (string, error)

func (GitRepo) HeadTags added in v0.7.0

func (r GitRepo) HeadTags() ([]string, error)

func (GitRepo) IsDirty added in v0.7.0

func (r GitRepo) IsDirty() (bool, error)

func (GitRepo) IsValid added in v0.7.0

func (r GitRepo) IsValid() bool

func (GitRepo) RemoteURL added in v0.7.0

func (r GitRepo) RemoteURL() (string, error)

type Image

type Image interface {
	URL() (string, []ctlconf.Origin, error)
}

type Matcher added in v0.41.0

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

func NewMatcher added in v0.41.0

func NewMatcher(url string) Matcher

func (Matcher) Matches added in v0.41.0

func (m Matcher) Matches(ref ctlconf.ImageRef) bool

type PlatformSelectedImage added in v0.41.0

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

PlatformSelectedImage selects specific image matching arch/platform

func NewPlatformSelectedImage added in v0.41.0

func NewPlatformSelectedImage(image Image,
	selection *ctlconf.PlatformSelection, registry ctlreg.Registry) PlatformSelectedImage

func (PlatformSelectedImage) URL added in v0.41.0

type PreresolvedImage added in v0.10.0

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

func NewPreresolvedImage added in v0.10.0

func NewPreresolvedImage(url string, origins []ctlconf.Origin) PreresolvedImage

func (PreresolvedImage) URL added in v0.10.0

func (i PreresolvedImage) URL() (string, []ctlconf.Origin, error)

type ResolvedImage

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

ResolvedImage represents an image that will be resolved into url+digest

func NewResolvedImage added in v0.5.0

func NewResolvedImage(url string, registry ctlreg.Registry) ResolvedImage

func (ResolvedImage) URL

func (i ResolvedImage) URL() (string, []ctlconf.Origin, error)

type TagSelectedImage added in v0.41.0

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

TagSelectedImage represents an image that will be resolved into url+digest

func NewTagSelectedImage added in v0.41.0

func NewTagSelectedImage(url string, selection *v1alpha1.VersionSelection,
	registry ctlreg.Registry) TagSelectedImage

func (TagSelectedImage) URL added in v0.41.0

func (i TagSelectedImage) URL() (string, []ctlconf.Origin, error)

type TaggedImage added in v0.41.0

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

TaggedImage represents an image that will be tagged when its URL is requested

func NewTaggedImage added in v0.41.0

func NewTaggedImage(image Image, imgDst ctlconf.ImageDestination, registry ctlreg.Registry) TaggedImage

func (TaggedImage) URL added in v0.41.0

func (i TaggedImage) URL() (string, []ctlconf.Origin, error)

Jump to

Keyboard shortcuts

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