sums

package
v2.16.4 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

sums creates and combines sha256sums files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(refs []PinnedImageReference, out io.Writer) error

Create creates a sha256sums file from a list of digests. The digests going in are expected to be in the oci format "sha256:hex".

func Merge

func Merge(refs [][]PinnedImageReference, out io.Writer) error

Merge merges multiple sha256sums files into one.

Types

type PinnedImageReference

type PinnedImageReference struct {
	Registry string
	Prefix   string
	Name     string
	Tag      string
	Digest   string
}

PinnedImageReference contains the components of a pinned image reference.

func Parse

func Parse(in io.Reader) ([]PinnedImageReference, error)

Parse parses a sha256sums file.

func (PinnedImageReference) Reference

func (r PinnedImageReference) Reference() string

Reference returns the string representation of the reference (without the digest).

func (PinnedImageReference) Sum

func (r PinnedImageReference) Sum() string

Sum returns the string representation of the digest. The digest is expected to be in the oci format "sha256:hex". The resulting Sum is only the hex part.

Jump to

Keyboard shortcuts

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