moduleconfig

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition struct {
	Action     string   `yaml:"action"`
	MatchField string   `yaml:"matchField"`
	WhenValue  string   `yaml:"whenValue"`
	Data       []string `yaml:"data,omitempty"`
}

type ModuleConfig

type ModuleConfig struct {
	Name                string
	Description         string
	Author              string
	DependsOn           []string `yaml:"dependsOn,omitempty"`
	TemplateConfig      `yaml:"template"`
	RequiredCredentials []string `yaml:"requiredCredentials"`
	Parameters          []Parameter
	Conditions          []Condition `yaml:"conditions,omitempty"`
}

func LoadModuleConfig

func LoadModuleConfig(filePath string) (ModuleConfig, error)

type Parameter

type Parameter struct {
	Field           string
	Label           string   `yaml:"label,omitempty"`
	Options         []string `yaml:"options,omitempty"`
	Execute         string   `yaml:"execute,omitempty"`
	Value           string   `yaml:"value,omitempty"`
	Default         string   `yaml:"default,omitempty"`
	Info            string   `yaml:"info,omitempty"`
	FieldValidation Validate `yaml:"fieldValidation,omitempty"`
}

type TemplateConfig

type TemplateConfig struct {
	StrictMode bool
	Delimiters []string
	InputDir   string `yaml:"inputDir"`
	OutputDir  string `yaml:"outputDir"`
}

type Validate

type Validate struct {
	Type         string `yaml:"type,omitempty"`
	Value        string `yaml:"value,omitempty"`
	ErrorMessage string `yaml:"errorMessage,omitempty"`
}

Jump to

Keyboard shortcuts

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