component

package
v1.225.0-rc.7 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package component resolves a component.yaml vendoring spec (plus any mixins) into the package list pkg/vendoring/install materializes -- the component.yaml counterpart to pkg/vendoring's own vendor.yaml source resolution.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrURIMustBeSpecified indicates a component.yaml declared no source.uri.
	ErrURIMustBeSpecified = errors.New("'uri' must be specified in 'source.uri' in the component vendoring config file")
	// ErrMissingMixinURI indicates a component.yaml mixin declared no uri.
	ErrMissingMixinURI = errors.New("'uri' must be specified for each 'mixin' in the 'component.yaml' file")
	// ErrMissingMixinFilename indicates a component.yaml mixin declared no filename.
	ErrMissingMixinFilename = errors.New("'filename' must be specified for each 'mixin' in the 'component.yaml' file")
)

Sentinel errors for pkg/vendoring/component, matching the precedent pkg/vendoring/install and pkg/vendoring/lockfile set for this refactor: package-local rather than centralized in errors/errors.go, since they are internal invariants of this package's own contract.

Functions

func BuildVendorPackages

func BuildVendorPackages(opts BuildPackagesOptions) ([]install.VendorPackage, error)

BuildVendorPackages resolves a single component's vendor spec (plus any mixins) into the package list pkg/vendoring/install consumes, without executing the pull.

Types

type BuildPackagesOptions

type BuildPackagesOptions struct {
	AtmosConfig         *schema.AtmosConfiguration
	VendorComponentSpec *schema.VendorComponentSpec
	Component           string
	ComponentPath       string
	// RefreshLock forces fresh semver-range version resolution -- see install.ResolveEffectiveVersion.
	RefreshLock bool
	// Lister overrides the remote Git tag lister used to resolve a semver-range `version:`; nil in
	// every production call path.
	Lister version.RemoteLister
	// TemplateFunc evaluates source-uri and mixin-uri templates -- callers pass internal/exec.ProcessTmpl.
	TemplateFunc TemplateFunc
}

BuildPackagesOptions bundles BuildVendorPackages' inputs (Options Pattern, CLAUDE.md: crossed the >4-total-parameters threshold once RefreshLock/Lister/TemplateFunc joined the original AtmosConfig/VendorComponentSpec/Component/ComponentPath).

type TemplateFunc

type TemplateFunc func(atmosConfig *schema.AtmosConfiguration, tmplName, tmplValue string, tmplData any, ignoreMissingTemplateValues bool) (string, error)

TemplateFunc evaluates a Go template against tmplData, matching internal/exec.ProcessTmpl's signature exactly -- callers pass ProcessTmpl itself, so this package needs no dependency on internal/exec's template machinery (which would create an import cycle: internal/exec already imports pkg/vendoring).

Jump to

Keyboard shortcuts

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