Versions in this module Expand all Collapse all v0 v0.1.5 Aug 29, 2025 v0.1.2 Aug 16, 2025 Changes in this version + var UnitRegistry = map[string]ExecutableUnit + func RegisterUnit(name string, unit ExecutableUnit) + func Test_Json_To_Graph() + type BranchFunc func(result *ExecutionResult, state ContextMap) string + type ContextMap map[string]*ExecutionResult + type ExecutableUnit interface + Execute func(ctx context.Context, state ContextMap, self *Node) (*ExecutionResult, error) + GetUnitMeta func() *Unit + func FindUnit(name string) (ExecutableUnit, bool) + type ExecutionResult struct + Data any + Error string + NodeName string + Raw any + Stream bool + func SimpleResult(data any) *ExecutionResult + type Graph struct + Edges map[string][]string + Hooks struct{ ... } + Nodes map[string]*Node + func BuildGraphFromJSON(data []byte) (*Graph, error) + func NewDSLGraph() *Graph + func (g *Graph) AddBranch(name string, exec NodeFunc, branch BranchFunc) + func (g *Graph) AddEdge(from, to string) + func (g *Graph) AddNode(name string, node *Node) + func (g *Graph) Branch(name string, fn NodeFunc, branch BranchFunc) *Graph + func (g *Graph) Loop(name string, fn NodeFunc, cond LoopCondFunc) *Graph + func (g *Graph) OnAfter(fn func(string, any, error, ContextMap)) *Graph + func (g *Graph) OnBefore(fn func(string, ContextMap)) *Graph + func (g *Graph) Parallel(name string, fns ...NodeFunc) *Graph + func (g *Graph) Run(ctx context.Context, start string, state ContextMap) error + func (g *Graph) RunWithDSL(ctx context.Context, state ContextMap) error + func (g *Graph) StartWith(name string, fn NodeFunc) *Graph + func (g *Graph) Then(name string, fn NodeFunc) *Graph + type GraphJSON struct + Edges map[string][]string + Nodes map[string]NodeJSON + type Input struct + Data any + DataType string + Slottable bool + type LoopCondFunc func(state ContextMap) bool + type Node struct + Branch BranchFunc + Execute NodeFunc + ExportFields []string + ID string + Input *Input + LoopCond func(ContextMap) bool + Name string + Parallel bool + type NodeFunc func(ctx context.Context, state ContextMap, self *Node) (*ExecutionResult, error) + type NodeJSON struct + Input *Input + Name string + Params map[string]any + UnitID string + type Unit struct + DisplayName string + ErrMsg string + ID string + OutputRef string + Status string + UnitName string + type UnitRepository struct + Mappings map[string]reflect.Type + func (r *UnitRepository) FindUnit(name string) (*Unit, error) + func (r *UnitRepository) ParsePhaseUnits(jsonData []byte, typeField string) ([]Unit, error) + func (r *UnitRepository) ParsePhaseUnitsFromMap(rawList []map[string]any) ([]Unit, error) + func (r *UnitRepository) RegisterUnit(name string, unit any) v0.1.1-alpha Aug 16, 2025 v0.0.7 Feb 27, 2025 v0.0.7-202502270012 Feb 27, 2025 v0.0.6-alpha Jan 16, 2025 v0.0.6-202501161422 Jan 16, 2025 v0.0.5 Jan 10, 2025 v0.0.5-alpha Jan 9, 2025 v0.0.3 Dec 24, 2024 v0.0.2 Dec 24, 2024