resourcesetinput

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: AGPL-3.0 Imports: 18 Imported by: 0 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

Overview

Package resourcesetinput owns ResourceSet input composition and template evaluation.

Index

Constants

This section is empty.

Variables

View Source
var ErrDocument = errors.New("invalid ResourceSet document")

ErrDocument identifies a document error that the renderer reports as input failure.

Functions

func Build added in v0.8.1

func Build(spec *fluxopv1.ResourceSetSpec, inputs []map[string]any, partial bool) ([]map[string]any, error)

Build applies Flux's precedence to rendered documents. Partial builds retain successful evaluations for projection and return the first error.

func Combine

func Combine(groups []Group, strategy *fluxopv1.InputStrategySpec) ([]map[string]any, error)

Combine applies the requested ResourceSet input composition strategy.

func Permute

func Permute(groups []Group, includeEmpty bool) ([]map[string]any, error)

Permute combines provider groups with the Flux Cartesian input semantics.

func Provider

func Provider(kind, name, namespace string) map[string]any

Provider identifies an input provider in the template context.

func ValidateSteps added in v0.8.1

func ValidateSteps(spec *fluxopv1.ResourceSetSpec) error

ValidateSteps applies the ResourceSet step requirements before input evaluation.

Types

type Group

type Group struct {
	Name   string
	Inputs []map[string]any
}

Group contains input sets under one provider name.

func Inline

func Inline(name, namespace string, inputs []fluxopv1.ResourceSetInput) Group

Inline decodes the ResourceSet's inline inputs with their provider context.

type ResourceKey added in v0.8.1

type ResourceKey struct {
	Group, Kind, Namespace, Name string
}

ResourceKey is the identity used to deduplicate authored documents.

func Key added in v0.8.1

func Key(doc map[string]any) ResourceKey

Key extracts a resource identity before namespace defaulting.

type Template

type Template struct {
	// contains filtered or unexported fields
}

Template holds one sequential template execution context.

func Parse

func Parse(tmplStr string) (*Template, error)

Parse compiles one ResourceSet template with the Flux function set.

func (*Template) Draft added in v0.8.1

func (pt *Template) Draft() []byte

Draft preserves literal YAML outside template control flow and marks unknown output.

func (*Template) Execute

func (pt *Template) Execute(inputSet map[string]any) ([]byte, error)

Execute evaluates the template with one input set and returns owned bytes.

Jump to

Keyboard shortcuts

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