tags

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SHAPermissivePrefixPattern = regexp.MustCompile(`^[a-f\d]{3,64}$`)
	SHAPattern                 = regexp.MustCompile(`^[a-f\d]{64}$`)
	CommitPattern              = regexp.MustCompile(`^[a-f\d]{40}$`)
	DigestPattern              = regexp.MustCompile(`^sha256:[a-f\d]{64}$`)
)

Functions

func Get

func Get(ctx context.Context, c client.Reader, namespace string) (apiv1.ImageList, error)

func GetTagsMatchingRepository

func GetTagsMatchingRepository(ctx context.Context, reference name.Reference, c client.Reader, namespace, defaultReg string) ([]string, error)

GetTagsMatchingRepository returns the tag portion of local images that match the repository in the supplied reference Note that the other functions in this package generally operate on the entire reference of an image as one opaque "tag" but this function is only returning the portion that follows the final semicolon. For example, the "tags" returned by the Get function are like "foo/bar:v1", but this function would just return "v1" for that image.

func HasNoSpecifiedRegistry

func HasNoSpecifiedRegistry(image string) bool

HasNoSpecifiedRegistry returns true if there is no registry specified in the image name, or if an error occurred while trying to parse it into a reference.

func IsImageDigest

func IsImageDigest(s string) bool

func IsLocalReference

func IsLocalReference(image string) bool

func ResolveLocal

func ResolveLocal(ctx context.Context, c kclient.Client, namespace, image string) (string, bool, error)

ResolveLocal determines if the image is local and if it is, resolves it to an image ID that can be pulled from the local registry

Types

This section is empty.

Jump to

Keyboard shortcuts

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