composer

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MPL-2.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadBlueprintIfTerraformProject added in v0.9.1

func LoadBlueprintIfTerraformProject(rt *runtime.Runtime, skipValidation bool, opts ...*Composer) error

LoadBlueprintIfTerraformProject composes the blueprint when terraform is enabled and the project has terraform components. It skips composition otherwise. A component's inputs can reference another component's output through terraform_output(...). Callers that load environment variables must run this first. A context without a blueprint composes as empty, because env and exec need only its env vars. opts overrides the constructed Composer's dependencies, the same as NewComposer.

Types

type Composer

type Composer struct {

	// Resource-specific dependencies
	ArtifactBuilder   artifact.Artifact
	BlueprintHandler  blueprint.BlueprintHandler
	TerraformResolver terraform.ModuleResolver
	// contains filtered or unexported fields
}

Composer holds the execution context for resource operations. It includes all resource-specific dependencies and core runtime dependencies.

func NewComposer

func NewComposer(rt *runtime.Runtime, opts ...*Composer) *Composer

NewComposer creates and initializes a new Composer instance with the provided execution context. It sets up all required resource handlers—artifact builder, blueprint handler, and terraform resolver. If overrides are provided, any non-nil component in the override Composer will be used instead of creating a default. It gives an ArtifactBuilder the inventory BOM writer, so a bundle holds the CycloneDX BOM of its artifact tags and sources. Panics if runtime or any required dependencies are nil.

func (*Composer) Bundle

func (r *Composer) Bundle(outputPath, tag string) (string, error)

Bundle writes an artifact of the project templates, kustomize files, and terraform files to outputPath. The tag sets the artifact name and version. It returns the path of the artifact.

func (*Composer) CheckKustomizePaths added in v0.10.0

func (r *Composer) CheckKustomizePaths() (warnings []string, composeErr error)

CheckKustomizePaths composes the blueprint and returns warnings for kustomization paths and components that the project lacks, and for kustomize directories under contexts/ that no kustomization can reach. The misplaced-directory warnings need no composition. A composition error ends the path check and is returned as composeErr, because a context without values can fail to compose.

func (*Composer) Generate

func (r *Composer) Generate(overwrite ...bool) error

Generate writes the blueprint files, processes the terraform modules, and writes the local .gitignore files. When terraform is enabled, it also generates the tfvars files. If overwrite is true, it replaces the existing blueprint files. It stops at the first error.

func (*Composer) Push

func (r *Composer) Push(registryURL string) (string, error)

Push bundles the project files and pushes the artifact to registryURL. registryURL can be registry.com/repo:tag, registry.com/repo, or oci://registry.com/repo:tag. It returns the registry URL with the repository and the tag.

type Shims added in v0.10.0

type Shims struct {
	shims.Shims
}

Shims holds the shared system call primitives of the composer.

func NewShims added in v0.10.0

func NewShims() *Shims

NewShims returns a Shims with every field set to its real implementation.

Directories

Path Synopsis
Package blueprint provides blueprint loading, facet processing, composition, and writing for the Windsor CLI.
Package blueprint provides blueprint loading, facet processing, composition, and writing for the Windsor CLI.

Jump to

Keyboard shortcuts

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