shared

package
v0.0.0-...-30beee0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Type       string
	Raw        string
	Pascalized string
}

type Expression

type Expression struct {
	Type string
	Raw  string
	Srno int
}

type LoopInfo

type LoopInfo struct {
	TaskName         string            `yaml:"task"`
	Input            map[string]string `yaml:"input"`
	PublishRaw       interface{}       `yaml:"publish"`
	Publish          map[string]string `yaml:"-"`
	PublishList      []PublishObj      `yaml:"-"`
	ErrorPublishRaw  interface{}       `yaml:"publish-on-error"`
	ErrorPublish     map[string]string `yaml:"-"`
	ErrorPublishList []PublishObj      `yaml:"-"`
}

type PostSpec

type PostSpec struct {
	//The original spec read from yaml
	OrigSpec *Spec
	// Compiled list of all the expressions in spec
	ExpressionMap map[string]Expression
	// Compiles list of actions
	ActionMap map[string]Action
	//Variables added by language level processing
	LanguageSpec map[string]interface{}
}

type PublishObj

type PublishObj struct {
	VariableName   string
	ExpressionName string
	Srno           int
}

type Spec

type Spec struct {
	Name        string                       `yaml:"name"`
	Start       []string                     `yaml:"start"`
	Tasks       map[string]Task              `yaml:"tasks"`
	Output      interface{}                  `yaml:"output"`
	ErrorOutput interface{}                  `yaml:"output-on-error"`
	References  map[string]map[string]string `yaml:"references"`
}

func ReadSpec

func ReadSpec(filename string) (Spec, error)

func (*Spec) Process

func (s *Spec) Process() (PostSpec, error)

type Task

type Task struct {
	Join                int                 `yaml:"join"`
	Action              string              `yaml:"action"`
	Input               map[string]string   `yaml:"input"`
	PublishRaw          interface{}         `yaml:"publish"`
	Publish             map[string]string   `yaml:"-"`
	PublishList         []PublishObj        `yaml:"-"`
	ErrorPublishRaw     interface{}         `yaml:"publish-on-error"`
	ErrorPublish        map[string]string   `yaml:"-"`
	ErrorPublishList    []PublishObj        `yaml:"-"`
	CompletePublishRaw  interface{}         `yaml:"publish-on-complete"`
	CompletePublish     map[string]string   `yaml:"-"`
	CompletePublishList []PublishObj        `yaml:"-"`
	OnError             []map[string]string `yaml:"on-error"`
	OnErrorList         []TodoObj           `yaml:"-"`
	OnSuccess           []map[string]string `yaml:"on-success"`
	OnSuccessList       []TodoObj           `yaml:"-"`
	OnComplete          []map[string]string `yaml:"on-complete"`
	OnCompleteList      []TodoObj           `yaml:"-"`
	Timeout             string              `yaml:"timeout"`
	WithItems           string              `yaml:"with-items"`
	Loop                LoopInfo            `yaml:"loop"`
}

type TodoObj

type TodoObj struct {
	TaskName       string
	ExpressionName string
	Srno           int
}

Jump to

Keyboard shortcuts

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