filters

package
v0.84.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: Apache-2.0 Imports: 14 Imported by: 8

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

Constants

This section is empty.

Variables

View Source
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.

View Source
var ErrLocalOSRequired = errors.New("localOS is required")

ErrLocalOSRequired is returned when localOS is not set.

Functions

func Apply added in v0.84.0

Apply applies a component filter to a package definition.

Types

type ComponentFilterStrategy

type ComponentFilterStrategy interface {
	// Apply returns the indices of the components to keep, in order.
	Apply(PackageView) ([]int, error)
}

ComponentFilterStrategy is a strategy interface for filtering 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

Combine creates a new filter that applies a sequence of filters.

func Empty

Empty returns a filter that does nothing.

func ForDeploy

func ForDeploy(optionalComponents string, isInteractive bool) ComponentFilterStrategy

ForDeploy creates a new deployment filter.

type ComponentView added in v0.84.0

type ComponentView struct {
	Name        string
	Description string
	Optional    bool
	Default     bool
	Group       string
	OnlyLocalOS string

	// Definition is the complete versioned component definition for interactive display.
	Definition any
}

ComponentView is the stable projection a filter sees.

type PackageView added in v0.84.0

type PackageView struct {
	Components []ComponentView
}

PackageView is the stable package projection a filter sees.

Jump to

Keyboard shortcuts

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