api

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultFileInclude = "**/*"

	StepTypeTemplate  = "template"
	StepTypeKustomize = "kustomize"
	StepTypeHelm      = "helm"
	StepTypeSplit     = "split"
	StepTypeGenerate  = "generate"

	SplitByKind     = "kind"
	SplitByResource = "resource"
	SplitByGroup    = "group"
	SplitByKindDir  = "kind-dir"
	SplitByCustom   = "custom"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FileFilter

type FileFilter struct {
	Include []string `yaml:"include"`
	Exclude []string `yaml:"exclude"`
}

FileFilter defines include/exclude glob patterns.

type GenerateConfig added in v1.4.0

type GenerateConfig struct {
	Output   string `yaml:"output"`
	Template string `yaml:"template"`
}

GenerateConfig configures the generate step.

type HelmConfig

type HelmConfig struct {
	Chart       string            `yaml:"chart"`
	ReleaseName string            `yaml:"releaseName"`
	Namespace   string            `yaml:"namespace"`
	ValuesFiles []string          `yaml:"valuesFiles"`
	Set         map[string]string `yaml:"set"`
}

HelmConfig configures the helm step.

type Instance added in v1.4.0

type Instance struct {
	Name    string         `yaml:"name"`
	Input   string         `yaml:"input"`
	Output  string         `yaml:"output"`
	Include []string       `yaml:"include"`
	Context map[string]any `yaml:"context"`
}

Instance defines a single instance in instances mode.

type InstancesConfig added in v1.4.0

type InstancesConfig struct {
	Instances []Instance `yaml:"instances"`
}

InstancesConfig is the top-level instances file format.

func LoadInstances added in v1.4.0

func LoadInstances(filename string) (*InstancesConfig, error)

LoadInstances reads an instances YAML file, unmarshals it, and validates.

func (*InstancesConfig) Validate added in v1.4.0

func (c *InstancesConfig) Validate() error

Validate checks the instances configuration for errors.

type KustomizeConfig

type KustomizeConfig struct {
	Dir        string `yaml:"dir"`
	EnableHelm bool   `yaml:"enableHelm"`
}

KustomizeConfig configures the kustomize step.

type Pipeline

type Pipeline struct {
	Context  map[string]any `yaml:"context"`
	Pipeline []StepConfig   `yaml:"pipeline"`

	// Set by the loader, not from YAML.
	Dir      string `yaml:"-"`
	FilePath string `yaml:"-"`
}

Pipeline is the .many.yaml configuration format.

func LoadPipeline

func LoadPipeline(filename string) (*Pipeline, error)

LoadPipeline reads a .many.yaml file, sets Dir/FilePath, and validates it.

func (*Pipeline) Validate

func (p *Pipeline) Validate() error

Validate checks the pipeline configuration for errors.

type SplitConfig

type SplitConfig struct {
	Input             string `yaml:"input"`
	By                string `yaml:"by"`
	OutputDir         string `yaml:"outputDir"`
	FileNameTemplate  string `yaml:"fileNameTemplate"`
	CanonicalKeyOrder *bool  `yaml:"canonicalKeyOrder,omitempty"` // default true
}

SplitConfig configures the split step.

type StepConfig

type StepConfig struct {
	Name      string           `yaml:"name"`
	Type      string           `yaml:"type"`
	Template  *TemplateConfig  `yaml:"template,omitempty"`
	Kustomize *KustomizeConfig `yaml:"kustomize,omitempty"`
	Helm      *HelmConfig      `yaml:"helm,omitempty"`
	Split     *SplitConfig     `yaml:"split,omitempty"`
	Generate  *GenerateConfig  `yaml:"generate,omitempty"`
}

StepConfig defines a single step within a pipeline.

type TemplateConfig

type TemplateConfig struct {
	Files FileFilter `yaml:"files"`
}

TemplateConfig configures the template step.

Jump to

Keyboard shortcuts

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