reference

package
v0.0.0-...-41d593c Latest Latest
Warning

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

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

Documentation

Overview

Utilities for container image reference strings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DigestExists

func DigestExists(imageRef string) bool

check if image reference contains digest

func GetCanonicalRef

func GetCanonicalRef(imageRef string, manifestDigest string) (reference.Canonical, error)

Given an image reference and a manifest digest string, returns an untagged canonical reference for the image. If the image reference has a digest then the canonical reference will still use the provided manifest digest overwriting the existing digest in the image reference.

func GetDigestFromImageRef

func GetDigestFromImageRef(imageRef string) digest.Digest

Helper function to parse an image reference and get digest from it if found. The caller must check that the returned digest is non-empty before using it.

func GetDigestFromRepoDigests

func GetDigestFromRepoDigests(repoDigests []string, imageRef string) (digest.Digest, error)

Finds a repo digest matching the provided image reference from a list of repo digests and returns the repo digest's digest.

Types

This section is empty.

Jump to

Keyboard shortcuts

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