Documentation ¶
Index ¶
- func FilterImages(images []*adapter.ContainerImage, filters []ResultFilter) []*adapter.ContainerImage
- type Filter
- type ResultFilter
- func CreatedAfterFilter(createTime time.Time) ResultFilter
- func CreatedBeforeFilter(createTime time.Time) ResultFilter
- func DanglingFilter(danglingImages bool) ResultFilter
- func LabelFilter(ctx context.Context, labelfilter string) ResultFilter
- func OutputImageFilter(userImage *adapter.ContainerImage) ResultFilter
- func ReferenceFilter(ctx context.Context, referenceFilter string) ResultFilter
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 ¶
type Filter func(*adapter.ContainerImage, *inspect.ImageData) bool
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