Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ModuleConfig ¶
type ModuleConfig struct {
Name string `json:"name" yaml:"name"`
Type string `json:"type" yaml:"type"`
Config map[string]any `json:"config,omitempty" yaml:"config,omitempty"`
DependsOn []string `json:"dependsOn,omitempty" yaml:"dependsOn,omitempty"`
Branches map[string]string `json:"branches,omitempty" yaml:"branches,omitempty"`
}
ModuleConfig represents a single module configuration
type PipelineConfig ¶
type PipelineConfig struct {
Trigger PipelineTriggerConfig `json:"trigger" yaml:"trigger"`
Steps []PipelineStepConfig `json:"steps" yaml:"steps"`
OnError string `json:"on_error,omitempty" yaml:"on_error,omitempty"`
Timeout string `json:"timeout,omitempty" yaml:"timeout,omitempty"`
Compensation []PipelineStepConfig `json:"compensation,omitempty" yaml:"compensation,omitempty"`
}
PipelineConfig represents a single composable pipeline definition.
type PipelineStepConfig ¶
type PipelineStepConfig struct {
Name string `json:"name" yaml:"name"`
Type string `json:"type" yaml:"type"`
Config map[string]any `json:"config,omitempty" yaml:"config,omitempty"`
OnError string `json:"on_error,omitempty" yaml:"on_error,omitempty"`
Timeout string `json:"timeout,omitempty" yaml:"timeout,omitempty"`
}
PipelineStepConfig defines a single step in a pipeline.
type PipelineTriggerConfig ¶
type PipelineTriggerConfig struct {
Type string `json:"type" yaml:"type"`
Config map[string]any `json:"config,omitempty" yaml:"config,omitempty"`
}
PipelineTriggerConfig defines what starts a pipeline.
type PluginRequirement ¶
type PluginRequirement struct {
Name string `json:"name" yaml:"name"`
Version string `json:"version,omitempty" yaml:"version,omitempty"`
}
PluginRequirement specifies a required plugin with optional version constraint.
type RequiresConfig ¶
type RequiresConfig struct {
Capabilities []string `json:"capabilities,omitempty" yaml:"capabilities,omitempty"`
Plugins []PluginRequirement `json:"plugins,omitempty" yaml:"plugins,omitempty"`
}
RequiresConfig declares what capabilities and plugins a workflow needs.
type WorkflowConfig ¶
type WorkflowConfig struct {
Modules []ModuleConfig `json:"modules" yaml:"modules"`
Workflows map[string]any `json:"workflows" yaml:"workflows"`
Triggers map[string]any `json:"triggers" yaml:"triggers"`
Pipelines map[string]any `json:"pipelines,omitempty" yaml:"pipelines,omitempty"`
Platform map[string]any `json:"platform,omitempty" yaml:"platform,omitempty"`
Requires *RequiresConfig `json:"requires,omitempty" yaml:"requires,omitempty"`
ConfigDir string `json:"-" yaml:"-"` // directory containing the config file, used for relative path resolution
}
WorkflowConfig represents the overall configuration for the workflow engine
func LoadFromFile ¶
func LoadFromFile(filepath string) (*WorkflowConfig, error)
LoadFromFile loads a workflow configuration from a YAML file
func LoadFromString ¶
func LoadFromString(yamlContent string) (*WorkflowConfig, error)
LoadFromString loads a workflow configuration from a YAML string.
func NewEmptyWorkflowConfig ¶
func NewEmptyWorkflowConfig() *WorkflowConfig
NewEmptyWorkflowConfig creates a new empty workflow configuration
func (*WorkflowConfig) ResolveRelativePath ¶
func (c *WorkflowConfig) ResolveRelativePath(path string) string
ResolveRelativePath resolves a path relative to the config file's directory. If the path is absolute, it is returned as-is.