imagefilters

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterImages

func FilterImages(images []*adapter.ContainerImage, filters []ResultFilter) []*adapter.ContainerImage

FilterImages filters images using a set of predefined filter funcs

Types

type Filter

Filter is a function to determine whether an image is included in command output. Images to be outputted are tested using the function. A true return will include the image, a false return will exclude it.

type ResultFilter

type ResultFilter func(*adapter.ContainerImage) bool

ResultFilter is a mock function for image filtering

func CreatedAfterFilter

func CreatedAfterFilter(createTime time.Time) ResultFilter

CreatedAfterFilter allows you to filter on images created after the given time.Time

func CreatedBeforeFilter

func CreatedBeforeFilter(createTime time.Time) ResultFilter

CreatedBeforeFilter allows you to filter on images created before the given time.Time

func DanglingFilter

func DanglingFilter(danglingImages bool) ResultFilter

DanglingFilter allows you to filter images for dangling images

func LabelFilter

func LabelFilter(ctx context.Context, labelfilter string) ResultFilter

LabelFilter allows you to filter by images labels key and/or value

func OutputImageFilter

func OutputImageFilter(userImage *adapter.ContainerImage) ResultFilter

OutputImageFilter allows you to filter by an a specific image name

func ReferenceFilter added in v1.2.0

func ReferenceFilter(ctx context.Context, referenceFilter string) ResultFilter

ReferenceFilter allows you to filter by image name Replacing all '/' with '|' so that filepath.Match() can work '|' character is not valid in image name, so this is safe

Jump to

Keyboard shortcuts

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