digest

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromReferenceSuffix

func FromReferenceSuffix(ref string) (string, bool)

FromReferenceSuffix returns the digest from a name@digest reference.

func Normalize

func Normalize(value string) (string, error)

Normalize parses and canonicalizes an OCI digest.

Types

type CheckResult

type CheckResult struct {
	NeedsUpdate   bool
	LocalDigest   string
	RemoteDigest  string
	Error         error
	CheckedViaAPI bool
}

CheckResult contains the result of a digest check.

type Checker

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

Checker compares local image digests with remote digests.

func NewChecker

func NewChecker(dcli *client.Client, digestResolver RemoteResolver) *Checker

NewChecker creates a digest checker.

func (*Checker) CheckImageNeedsUpdate

func (c *Checker) CheckImageNeedsUpdate(ctx context.Context, imageRef string) CheckResult

CheckImageNeedsUpdate compares local and remote digests for an image.

func (*Checker) CompareWithPulled

func (c *Checker) CompareWithPulled(ctx context.Context, containerImageID string, newImageRef string) (bool, error)

CompareWithPulled compares the current container image ID with a freshly pulled image.

func (*Checker) GetImageIDsForRef

func (c *Checker) GetImageIDsForRef(ctx context.Context, ref string) ([]string, error)

GetImageIDsForRef returns local image IDs associated with a reference.

type RemoteResolver

type RemoteResolver interface {
	GetImageDigest(ctx context.Context, imageRef string) (string, error)
}

RemoteResolver resolves a remote image digest without pulling.

Jump to

Keyboard shortcuts

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