scfconfig

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandsToRun

type CommandsToRun struct {
	WorkingDirectory string   `yaml:"workingDirectory"`
	Condition        string   `yaml:"condition"`
	PostScaffold     []string `yaml:"postScaffold"`
}

type Form

type Form struct {
	Condition string       `yaml:"condition"`
	Fields    []*FormField `yaml:"fields"`
}

func (*Form) Validate

func (f *Form) Validate() error

type FormField

type FormField struct {
	VariableName string        `yaml:"variableName"`
	Title        string        `yaml:"title"`
	Description  string        `yaml:"description"`
	Type         FormFieldType `yaml:"type"`
	Required     bool          `yaml:"required"`
	Default      interface{}   `yaml:"default"`
	Options      []string      `yaml:"options"`
}

func (*FormField) Validate

func (f *FormField) Validate() error

type FormFieldType

type FormFieldType string
const (
	FormFieldTypeInput       FormFieldType = "input"
	FormFieldTypeText        FormFieldType = "text"
	FormFieldTypeSelect      FormFieldType = "select"
	FormFieldTypeMultiSelect FormFieldType = "multiselect"
	FormFieldTypeConfirm     FormFieldType = "confirm"
)

type Scaffold

type Scaffold struct {
	Condition string   `yaml:"condition"`
	Files     []string `yaml:"files"`
	Parse     []string `yaml:"parse"`
}

type ScfConfig

type ScfConfig struct {
	Forms    []*Form                `yaml:"forms"`
	Scaffold map[string][]*Scaffold `yaml:"scaffold"`
	Commands []*CommandsToRun       `yaml:"commands"`
}

func NewScfConfig

func NewScfConfig(source string) (*ScfConfig, error)

func (*ScfConfig) Validate

func (s *ScfConfig) Validate() error

Jump to

Keyboard shortcuts

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