Documentation
¶
Index ¶
- type AndExpr
- type ComparisonExpr
- type ConditionExpr
- type FlowEngine
- func (e *FlowEngine) Execute() error
- func (e *FlowEngine) ExecuteAPICallStep(step FlowStep) error
- func (e *FlowEngine) ExecuteConditionalStep(step FlowStep) error
- func (e *FlowEngine) ExecuteFunctionStep(step FlowStep) error
- func (e *FlowEngine) ExecuteSingleStep(step FlowStep) error
- func (e *FlowEngine) FindStepByName(name string) *FlowStep
- func (e *FlowEngine) LoadFlowFromFile(filename string) error
- func (e *FlowEngine) RegisterFunction(name string, fn any)
- type FlowStep
- type OrExpr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AndExpr ¶
type AndExpr struct {
Left, Right ConditionExpr
}
type ComparisonExpr ¶
type ConditionExpr ¶
Condition expression parsing and evaluation
type FlowEngine ¶
type FlowEngine struct {
State map[string]any
Functions map[string]any
Templates map[string]string
Steps []FlowStep
}
1. Definisi struktur Flow Engine
func (*FlowEngine) ExecuteAPICallStep ¶
func (e *FlowEngine) ExecuteAPICallStep(step FlowStep) error
func (*FlowEngine) ExecuteConditionalStep ¶
func (e *FlowEngine) ExecuteConditionalStep(step FlowStep) error
func (*FlowEngine) ExecuteFunctionStep ¶
func (e *FlowEngine) ExecuteFunctionStep(step FlowStep) error
6. Eksekusi Function Step dengan Reflection
func (*FlowEngine) ExecuteSingleStep ¶
func (e *FlowEngine) ExecuteSingleStep(step FlowStep) error
func (*FlowEngine) FindStepByName ¶
func (e *FlowEngine) FindStepByName(name string) *FlowStep
func (*FlowEngine) LoadFlowFromFile ¶
func (e *FlowEngine) LoadFlowFromFile(filename string) error
4. Load Flow dari JSON
func (*FlowEngine) RegisterFunction ¶
func (e *FlowEngine) RegisterFunction(name string, fn any)
3. Registrasi Function
type FlowStep ¶
type FlowStep struct {
Name string `json:"name"`
Description string `json:"description"`
Type string `json:"type"` // "function", "api_call", "conditional"
Function string `json:"function,omitempty"`
Params map[string]any `json:"params"`
NextOnSuccess string `json:"next_on_success,omitempty"`
NextOnError string `json:"next_on_error,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.