manifest

package
v4.0.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyFilters

func ApplyFilters(o *GrowOptions, rii registry.RegInvImage) (registry.RegInvImage, error)

ApplyFilters applies the filters in the options to whittle down the given rii.

func ExcludeTags

func ExcludeTags(rii registry.RegInvImage, excludedTags map[image.Tag]bool) registry.RegInvImage

ExcludeTags removes tags in rii that match excludedTags.

func FilterByDigests

func FilterByDigests(rii registry.RegInvImage, filterDigests []image.Digest) registry.RegInvImage

FilterByDigests removes all images in RegInvImage that do not match the filterDigest.

func FilterByImages

func FilterByImages(rii registry.RegInvImage, filterImages []image.Name) registry.RegInvImage

FilterByImages removes all images in RegInvImage that do not match the filterImage.

func FilterByTags

func FilterByTags(rii registry.RegInvImage, filterTags []image.Tag) registry.RegInvImage

FilterByTags removes all images in RegInvImage that do not match the filterTag. TODO(manifest): Dedupe with `FilterByTag` in legacy/dockerregistry/inventory.go

func Find

func Find(o *GrowOptions) (schema.Manifest, error)

Find finds the manifest to modify.

func Grow

func Grow(
	_ context.Context,
	o *GrowOptions,
) error

Grow modifies a manifest by adding images into it.

func ReadStagingRepo

func ReadStagingRepo(
	o *GrowOptions,
) (registry.RegInvImage, error)

ReadStagingRepo reads the StagingRepo, and applies whatever filters are available to the resulting RegInvImage. This RegInvImage is what we want to inject into the "images.yaml" of a thin schema.

func Union

Union inject b's contents into a. However, it does so in a special way.

func Write

Write writes images as YAML out to the expected path of the given (thin) schema.

Types

type GrowOptions

type GrowOptions struct {
	// BaseDir is the directory containing the thin promoter manifests.
	BaseDir string
	// StagingRepo is the staging subproject repo to read from. If no filters
	// are provided, all images are attempted to be promoted as-is without any
	// modifications.
	StagingRepo image.Registry
	// FilterImage is the image (name) to filter by. Optional.
	FilterImages []image.Name
	// FilterDigest is the image digest to filter by. Optional.
	FilterDigests []image.Digest
	// FilterTags is the image tag to filter by. Optional.
	FilterTags []image.Tag
}

GrowOptions holds the parameters for modifying manifests.

func (*GrowOptions) Populate

func (o *GrowOptions) Populate(
	baseDir,
	stagingRepo string,
	filterImages,
	filterDigests,
	filterTags []string,
) error

Populate sets the values for GrowOptions.

func (*GrowOptions) Validate

func (o *GrowOptions) Validate() error

Validate validates the options.

Jump to

Keyboard shortcuts

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