composition

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildPackageArchive

func BuildPackageArchive(rootDir, outputPath string) error

BuildPackageArchive validates a composition package directory and writes a .tgz archive.

func LockFilePath

func LockFilePath(intentPath string) string

LockFilePath returns the default lock-file path for an intent file.

func PushPackageArchive added in v0.20.2

func PushPackageArchive(archivePath, ref string) error

PushPackageArchive publishes a package archive to an OCI registry using oras.

func WriteLockFile

func WriteLockFile(intentPath string, sources []model.ResolvedCompositionSource) error

WriteLockFile writes the resolved composition lock next to the intent.

Types

type Composition

type Composition struct {
	Key             string
	Name            string
	Description     string
	DefaultJobName  string
	InputSchema     map[string]interface{}
	Jobs            []model.JobSpec
	JobMap          map[string]*model.JobSpec
	Schema          *jsonschema.Schema
	JobRegistryName string
	JobRegistryDesc string
	SourceName      string
	SourceKind      string
	SourceRef       string
	SourcePath      string
	ExportPath      string
	ResolvedDigest  string
}

Composition is the resolved internal representation used by planning and validation.

type Registry

type Registry struct {
	Types    map[string]*Composition
	ByKey    map[string]*Composition
	Jobs     *model.JobRegistry
	Bindings map[string]*model.JobBinding
	Sources  []model.ResolvedCompositionSource
}

Registry holds resolved compositions and the sources they came from.

func LoadFromDir

func LoadFromDir(configDir string) (*Registry, error)

LoadFromDir loads legacy folder-shaped compositions from a config dir.

func LoadRegistry

func LoadRegistry(intent *model.Intent, intentPath, legacyConfigDir string) (*Registry, error)

LoadRegistry resolves declared composition sources from intent and falls back to the legacy config dir when needed.

func (*Registry) ValidateAllComponents

func (reg *Registry) ValidateAllComponents(normalized *model.NormalizedIntent) error

ValidateAllComponents validates all normalized components against their resolved schemas.

func (*Registry) ValidateComponentAgainstComposition

func (reg *Registry) ValidateComponentAgainstComposition(component *model.Component) error

ValidateComponentAgainstComposition validates a component against the resolved schema selected for it.

Jump to

Keyboard shortcuts

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