match

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: Apache-2.0 Imports: 2 Imported by: 24

Documentation

Overview

Package match provides functionality for conveniently matching a v1.Descriptor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Matcher

type Matcher func(desc v1.Descriptor) bool

Matcher function that is given a v1.Descriptor, and returns whether or not it matches a given rule. Can match on anything it wants in the Descriptor.

func Annotation

func Annotation(key, value string) Matcher

Annotation returns a match.Matcher that matches based on the provided annotation.

func Digests added in v0.3.0

func Digests(digests ...v1.Hash) Matcher

Digests returns a match.Matcher that matches at least one of the provided Digests

func MediaTypes

func MediaTypes(mediaTypes ...string) Matcher

MediaTypes returns a match.Matcher that matches at least one of the provided media types.

func Name

func Name(name string) Matcher

Name returns a match.Matcher that matches based on the value of the

"org.opencontainers.image.ref.name" annotation:

github.com/opencontainers/image-spec/blob/v1.0.1/annotations.md#pre-defined-annotation-keys

func Platforms added in v0.3.0

func Platforms(platforms ...v1.Platform) Matcher

Platforms returns a match.Matcher that matches on any one of the provided platforms. Ignores any descriptors that do not have a platform.

Jump to

Keyboard shortcuts

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