model

package
v0.0.0-...-6da1a64 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepMap

func DeepMap(input any, transform func(el string) (any, error)) (any, error)

DeepMap recursively applies a transformation function over each string within:

  • a map[string]any
  • a []any
  • a string

func GenerateJsonSchema

func GenerateJsonSchema() ([]byte, error)

func ParseWorkflowSpecYaml

func ParseWorkflowSpecYaml(data string) (workflowSpec, error)

Types

type ExecutionStrategy

type ExecutionStrategy interface {
	Apply(ctx context.Context, l logger.Logger, cap capabilities.CallbackCapability, req capabilities.CapabilityRequest) (values.Value, error)
}

type Workflow

type Workflow struct {
	ID string
	graph.Graph[string, *step]

	Triggers []*triggerCapability

	Spec *workflowSpec
}

Workflow is a directed graph of nodes, where each node is a step.

triggers are special steps that are stored separately, they're treated differently due to their nature of being the starting point of a Workflow.

func Parse

func Parse(yamlWorkflow string) (*Workflow, error)

func (*Workflow) Dependents

func (w *Workflow) Dependents(start string) ([]*step, error)

func (*Workflow) WalkDo

func (w *Workflow) WalkDo(start string, do func(s *step) error) error

Jump to

Keyboard shortcuts

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