playbook

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderTemplate

func RenderTemplate(playbook_base_dir string, input_data map[string]interface{}, template_filepath string, output_filepath string) error

func ValidatePlaybook

func ValidatePlaybook(playbook Playbook, playbook_base_dir string) (bool, error)

Types

type Output

type Output struct {
	TemplateFile string `yaml:"templateFile,omitempty"`
	OutputFile   string `yaml:"outputFile,omitempty"`
}

type Playbook

type Playbook struct {
	Name        string     `yaml:"name,omitempty"`
	Description string     `yaml:"description,omitempty"`
	Questions   []Question `yaml:"questions,omitempty"`
	Outputs     []Output   `yaml:"outputs"`
}

func LoadYAMLFile

func LoadYAMLFile(file_path string) (Playbook, error)

type Question

type Question struct {
	Prompt       string   `yaml:"prompt,omitempty"`
	Placeholder  string   `yaml:"placeholder,omitempty"`
	Required     bool     `yaml:"required,omitempty"`
	VariableName string   `yaml:"variableName"`
	InputType    string   `yaml:"inputType"`
	VariableType string   `yaml:"variableType"`
	Default      string   `yaml:"default,omitempty"`
	ValidValues  []string `yaml:"validValues,omitempty"`
}

Jump to

Keyboard shortcuts

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