synthesis

package
v0.6.3 Latest Latest
Warning

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

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

Documentation

Overview

Package synthesis generates temporary CUE modules that synthesize a #ModuleRelease from a target module. The synthesized package imports the target module via CUE's native OCI module resolution, producing the same result as a hand-written release.cue in the CLI workflow.

Index

Constants

View Source
const CUELanguageVersion = "v0.16.1"

CUELanguageVersion is the CUE language version for synthesized modules.

View Source
const CatalogVersion = "v1.3.4"

CatalogVersion is the pinned catalog version the controller was built against. Update when releasing a new controller version.

View Source
const SynthesisModule = "opmodel.dev/controller/release@v0"

SynthesisModule is the CUE module path for synthesized release packages.

Variables

This section is empty.

Functions

func SynthesizeRelease

func SynthesizeRelease(params ReleaseParams) (string, error)

SynthesizeRelease creates a temporary directory containing a CUE module that synthesizes a #ModuleRelease for the given parameters. The caller must remove the directory when done (typically via defer os.RemoveAll).

The synthesized module contains:

  • cue.mod/module.cue: declares dependencies on the catalog and target module
  • release.cue: imports #ModuleRelease and the target module, sets metadata

Types

type ReleaseParams

type ReleaseParams struct {
	// Name is the ModuleRelease CR metadata.name.
	Name string

	// Namespace is the ModuleRelease CR metadata.namespace.
	Namespace string

	// ModulePath is the CUE module import path (e.g. "opmodel.dev/modules/cert_manager@v0").
	ModulePath string

	// ModuleVersion is the pinned version (e.g. "v0.2.1").
	ModuleVersion string
}

ReleaseParams holds the inputs for synthesizing a release CUE package.

Jump to

Keyboard shortcuts

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