Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateExtendsRefs ¶
ValidateExtendsRefs checks that every extends ref references a declared composition source.
func ValidatePresetSpec ¶
func ValidatePresetSpec(preset *model.IntentPreset, prov model.PresetProvenance) error
ValidatePresetSpec checks that a loaded IntentPreset does not contain forbidden fields.
Types ¶
type MergeResult ¶
type MergeResult struct {
Intent *model.Intent
Provenance map[string][]model.PresetProvenance
}
MergeResult holds the merged intent and provenance metadata.
func MergePresets ¶
func MergePresets(intent *model.Intent, presets []*ResolvedPreset) (*MergeResult, error)
MergePresets applies resolved presets to the intent using deterministic field-specific merge rules. Presets are applied in declaration order, then the original repo intent is overlaid on top (repo always wins for defaults).
type ResolvedPreset ¶
type ResolvedPreset struct {
Preset model.IntentPreset
Provenance model.PresetProvenance
}
ResolvedPreset pairs a parsed IntentPreset with its provenance.
func LoadPresetsForIntent ¶
func LoadPresetsForIntent(intent *model.Intent, sourceRoots map[string]string) ([]*ResolvedPreset, error)
LoadPresetsForIntent resolves each extends ref against the already-resolved composition source directories and returns parsed presets in declaration order.