filter

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter[T catalogmetadata.Schemas](in []*T, test Predicate[T]) []*T

Filter filters a slice accordingly to

Types

type Predicate

type Predicate[T catalogmetadata.Schemas] func(entity *T) bool

Predicate returns true if the object should be kept when filtering

func And

func And[T catalogmetadata.Schemas](predicates ...Predicate[T]) Predicate[T]

func InBlangSemverRange

func InBlangSemverRange(semverRange bsemver.Range) Predicate[catalogmetadata.Bundle]

func InChannel

func InChannel(channelName string) Predicate[catalogmetadata.Bundle]

func InMastermindsSemverRange

func InMastermindsSemverRange(semverRange *mmsemver.Constraints) Predicate[catalogmetadata.Bundle]

func Not

func Not[T catalogmetadata.Schemas](predicate Predicate[T]) Predicate[T]

func Or

func Or[T catalogmetadata.Schemas](predicates ...Predicate[T]) Predicate[T]

func Replaces

func Replaces(bundleName string) Predicate[catalogmetadata.Bundle]

func WithBundleImage

func WithBundleImage(bundleImage string) Predicate[catalogmetadata.Bundle]

func WithPackageName

func WithPackageName(packageName string) Predicate[catalogmetadata.Bundle]

Jump to

Keyboard shortcuts

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