Documentation ¶
Overview ¶
Package filters contains core implementations of the ComponentFilterStrategy interface.
Package filters contains core implementations of the ComponentFilterStrategy interface.
Package filters contains core implementations of the ComponentFilterStrategy interface.
Package filters contains core implementations of the ComponentFilterStrategy interface.
Package filters contains core implementations of the ComponentFilterStrategy interface.
Package filters contains core implementations of the ComponentFilterStrategy interface.
Index ¶
- Variables
- type ComponentFilterStrategy
- func ByDifferentialData(diffData *types.DifferentialData) ComponentFilterStrategy
- func ByLocalOS(localOS string) ComponentFilterStrategy
- func BySelectState(optionalComponents string) ComponentFilterStrategy
- func Combine(filters ...ComponentFilterStrategy) ComponentFilterStrategy
- func Empty() ComponentFilterStrategy
- func ForDeploy(optionalComponents string, isInteractive bool) ComponentFilterStrategy
Constants ¶
This section is empty.
Variables ¶
var ( ErrMultipleSameGroup = fmt.Errorf("cannot specify multiple components from the same group") ErrNoDefaultOrSelection = fmt.Errorf("no default or selected component found") ErrNotFound = fmt.Errorf("no compatible components found") ErrSelectionCanceled = fmt.Errorf("selection canceled") )
Errors for the deployment filter.
var ErrLocalOSRequired = errors.New("localOS is required")
ErrLocalOSRequired is returned when localOS is not set.
Functions ¶
This section is empty.
Types ¶
type ComponentFilterStrategy ¶
type ComponentFilterStrategy interface {
Apply(v1alpha1.ZarfPackage) ([]v1alpha1.ZarfComponent, error)
}
ComponentFilterStrategy is a strategy interface for filtering components.
func ByDifferentialData ¶
func ByDifferentialData(diffData *types.DifferentialData) ComponentFilterStrategy
ByDifferentialData filters any images and repos already present in the reference package components.
func ByLocalOS ¶
func ByLocalOS(localOS string) ComponentFilterStrategy
ByLocalOS creates a new filter that filters components based on local (runtime) OS.
func BySelectState ¶
func BySelectState(optionalComponents string) ComponentFilterStrategy
BySelectState creates a new simple included filter.
func Combine ¶
func Combine(filters ...ComponentFilterStrategy) ComponentFilterStrategy
Combine creates a new filter that applies a sequence of filters.
func ForDeploy ¶
func ForDeploy(optionalComponents string, isInteractive bool) ComponentFilterStrategy
ForDeploy creates a new deployment filter.