QBitRun/lib/workflow/workflow.go

19 lines
460 B
Go
Raw Permalink Normal View History

package workflow
2024-06-27 16:47:11 +07:00
type WorkflowInput interface {
2024-07-03 21:57:45 +07:00
// Workflows returns a slice of Workflows.
// It returns an error if any of the workflows are invalid.
//
// Implementor must clean up any resources (e.g. closing files) after transformation.
2024-06-27 16:47:11 +07:00
Workflows() ([]Workflow, error)
}
type Workflow struct {
Name string `yaml:"name"`
Disabled bool `yaml:"disabled"`
When string `yaml:"when"`
Jobs Jobs `yaml:"jobs"`
}
type Jobs map[string]Job