Documentation ¶
Index ¶
- func ApplyFilters(o *GrowOptions, rii registry.RegInvImage) (registry.RegInvImage, error)
- func ExcludeTags(rii registry.RegInvImage, excludedTags map[image.Tag]bool) registry.RegInvImage
- func FilterByDigests(rii registry.RegInvImage, filterDigests []image.Digest) registry.RegInvImage
- func FilterByImages(rii registry.RegInvImage, filterImages []image.Name) registry.RegInvImage
- func FilterByTags(rii registry.RegInvImage, filterTags []image.Tag) registry.RegInvImage
- func Find(o *GrowOptions) (schema.Manifest, error)
- func Grow(ctx context.Context, o *GrowOptions) error
- func ReadStagingRepo(o *GrowOptions) (registry.RegInvImage, error)
- func Union(a, b registry.RegInvImage) registry.RegInvImage
- func Write(m schema.Manifest, rii registry.RegInvImage) error
- type GrowOptions
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 Grow ¶
func Grow( ctx 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 ¶
func Union(a, b registry.RegInvImage) registry.RegInvImage
Union inject b's contents into a. However, it does so in a special way.
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.