Documentation
¶
Index ¶
- Constants
- func Affected(affected []schema.Affected, flattenDependents bool) []map[string]any
- func Components(stacksMap map[string]any) ([]map[string]any, error)
- func ComponentsForStack(stackName string, stacksMap map[string]any) ([]map[string]any, error)
- func GetLabelsFromMetadata(metadata map[string]any) map[string]string
- func GetTagsFromMetadata(metadata map[string]any) []string
- func Instances(instances []schema.Instance) []map[string]any
- func Metadata(instances []schema.Instance) []map[string]any
- func Stacks(stacksMap map[string]any, tagsFilter []string, labelsFilter map[string]string) ([]map[string]any, error)
- func StacksForComponent(componentName string, stacksMap map[string]any, tagsFilter []string, ...) ([]map[string]any, error)
- func StacksMatrixEntries(stacksMap map[string]any) []matrix.Entry
- func UniqueComponents(stacksMap map[string]any, stackPattern string) ([]map[string]any, error)
- func Vendor(vendorInfos []VendorInfo) ([]map[string]any, error)
- func Workflows(atmosConfig *schema.AtmosConfiguration, fileFilter string) ([]map[string]any, error)
- type GetVendorInfosFunc
- type VendorInfo
Constants ¶
const ( // VendorTypeComponent is the type for components with component manifests. VendorTypeComponent = "Component Manifest" // VendorTypeVendor is the type for vendor manifests. VendorTypeVendor = "Vendor Manifest" )
Variables ¶
This section is empty.
Functions ¶
func Affected ¶ added in v1.203.0
Affected transforms a slice of schema.Affected into []map[string]any for the renderer. If flattenDependents is true, dependents are flattened into separate rows with is_dependent=true.
func Components ¶
Components transforms stacksMap into structured component data. Returns []map[string]any suitable for the renderer pipeline.
func ComponentsForStack ¶
ComponentsForStack extracts components for a specific stack only.
func GetLabelsFromMetadata ¶ added in v1.225.0
GetLabelsFromMetadata extracts metadata.labels as a map[string]string for callers outside package extract. Returns an empty (non-nil) map when absent or not an object.
func GetTagsFromMetadata ¶ added in v1.225.0
GetTagsFromMetadata extracts metadata.tags as a []string for callers outside package extract (e.g. cmd/list sources, pkg/list/dependencies). Returns an empty (non-nil) slice when absent or not a list.
func Instances ¶
ExtractInstances transforms schema.Instance slice into []map[string]any for renderer. Converts structured Instance objects into flat maps accessible by column templates.
func Metadata ¶
Metadata transforms a slice of schema.Instance into []map[string]any for the renderer. It extracts metadata fields and makes them accessible to column templates.
func Stacks ¶
func Stacks(stacksMap map[string]any, tagsFilter []string, labelsFilter map[string]string) ([]map[string]any, error)
Stacks transforms stacksMap into structured stack data. It returns []map[string]any suitable for the renderer pipeline. Exposes vars from components for template access (e.g., {{ .vars.namespace }}). When tagsFilter/labelsFilter are non-empty, only stacks where at least one component independently satisfies both filters (tags: any-match, labels: all-match) are returned — union semantics across the stack's components.
func StacksForComponent ¶
func StacksForComponent(componentName string, stacksMap map[string]any, tagsFilter []string, labelsFilter map[string]string) ([]map[string]any, error)
StacksForComponent extracts stacks that contain a specific component. When tagsFilter/labelsFilter are non-empty, only stacks where that specific component's own metadata.tags/metadata.labels satisfy the filters are returned. ErrNoStacksFound is reserved for "component not found in any stack"; a component that exists but matches no filter yields an empty result with no error.
func StacksMatrixEntries ¶ added in v1.216.0
StacksMatrixEntries extracts all stack+component pairs from stacksMap as matrix entries. Each entry includes stack, component, component_path, and component_type — matching the format used by describe affected --format=matrix.
func UniqueComponents ¶ added in v1.204.0
UniqueComponents extracts deduplicated components from all stacks. Returns unique component names with aggregated metadata (stack count, types). This is the original behavior of "list components" - showing unique component definitions. The stackPattern parameter is an optional glob pattern to filter which stacks to consider.
Types ¶
type GetVendorInfosFunc ¶
type GetVendorInfosFunc func(*schema.AtmosConfiguration) ([]VendorInfo, error)
GetVendorInfosFunc is a function type for getting vendor information. This allows the extract package to avoid importing the list package.