spec

package
v0.0.0-...-5bbe91c Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildParamLookup

func BuildParamLookup(spec *SpecConfig) map[string]map[string]any

BuildParamLookup transforms the list of parameter sets into a nested map for easy lookups.

func ParseCliParams

func ParseCliParams(params []string) (map[string]any, error)

ParseCliParams parses command-line parameters into a map, inferring types.

Types

type ParamSet

type ParamSet struct {
	Values   map[string]any `yaml:"values"`
	TargetId []string       `yaml:"targetId"`
}

ParamSet defines a set of values for one or more targets

type SpecConfig

type SpecConfig struct {
	Templates   []string     `yaml:"templates"`
	TargetIds   []string     `yaml:"targetIds"`
	Parameters  []ParamSet   `yaml:"parameters"`
	Validations []Validation `yaml:"validations"`
}

SpecConfig defines the structure of the spec.yaml file

type Validation

type Validation struct {
	Rule     string   `yaml:"rule"`
	Message  string   `yaml:"message"`
	TargetId []string `yaml:"targetId"`
}

Validations defines a set of policy rules.

Jump to

Keyboard shortcuts

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