templates

package
v0.19.921 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlowConfig

type FlowConfig struct {
	JobType             string `json:"job_type"`
	LogTemplate         string `json:"log_template,omitempty"`          // key into LogTemplates()
	PlanTemplate        string `json:"plan_template,omitempty"`         // key into PlanTemplates()
	PlanDisplayTemplate string `json:"plan_display_template,omitempty"` // key into PlanDisplayTemplates()
	StateTemplate       string `json:"state_template,omitempty"`        // key into StateTemplates()
	OutputTemplate      string `json:"output_template,omitempty"`       // key into OutputTemplates()
	DurationMs          int64  `json:"duration_ms"`
	Enabled             bool   `json:"enabled"`
}

FlowConfig defines one runner job config within a flow template.

type FlowTemplate

type FlowTemplate struct {
	Key         string       `json:"key"`
	Name        string       `json:"name"`
	Description string       `json:"description"`
	IsNoop      bool         `json:"is_noop"`
	Configs     []FlowConfig `json:"configs"`
}

FlowTemplate is a pre-built collection that configures multiple runner jobs at once to simulate an entire deployment flow.

func FindFlowTemplate

func FindFlowTemplate(key string) *FlowTemplate

FindFlowTemplate returns the flow template with the given key, or nil.

func FlowTemplates

func FlowTemplates() []FlowTemplate

FlowTemplates returns all pre-built flow templates.

type Template

type Template struct {
	Key         string   `json:"key"`
	Description string   `json:"description"`
	Category    string   `json:"category"`  // "logs", "plans", "outputs"
	JobTypes    []string `json:"job_types"` // which runner job types this template applies to
	Contents    string   `json:"contents"`  // the actual template content
	IsNoop      bool     `json:"is_noop"`   // whether this is a noop template
}

Template represents a sandbox mode template that can be used to populate runner job logs, plans, or outputs in sandbox mode.

func AllTemplates

func AllTemplates() []Template

AllTemplates returns all available templates across all categories.

func FindTemplate

func FindTemplate(key string) *Template

FindTemplate returns the individual template with the given key, or nil.

func LogTemplates

func LogTemplates() []Template

LogTemplates returns all log templates.

func NoopTemplates

func NoopTemplates() []Template

NoopTemplates returns all templates marked as noop.

func OutputTemplates

func OutputTemplates() []Template

OutputTemplates returns all output templates.

func PlanDisplayTemplates

func PlanDisplayTemplates() []Template

PlanDisplayTemplates returns all human-readable plan display templates.

func PlanTemplates

func PlanTemplates() []Template

PlanTemplates returns all plan templates (machine-readable JSON).

func StateTemplates

func StateTemplates() []Template

StateTemplates returns all terraform state JSON templates.

func TemplatesForJobType

func TemplatesForJobType(jobType string) []Template

TemplatesForJobType returns all templates that apply to the given runner job type.

Jump to

Keyboard shortcuts

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