Versions in this module Expand all Collapse all v0 v0.2.0 Apr 23, 2026 Changes in this version + const MaxConcurrentWorkflowRunsPerTenant + const MaxConcurrentWorkflowRunsPerWorkflow + func RegisterAllActionHandlers(executor *WorkflowExecutor, vulnSvc *finding.VulnerabilityService, ...) + func RegisterAllActionHandlersWithAI(executor *WorkflowExecutor, vulnSvc *finding.VulnerabilityService, ...) + func ValidateSourceFilter(ctx context.Context, config map[string]any, ...) error + type AITriageActionHandler struct + func NewAITriageActionHandler(aiTriageSvc *aitriage.AITriageService, log *logger.Logger) *AITriageActionHandler + func (h *AITriageActionHandler) Execute(ctx context.Context, input *ActionInput) (map[string]any, error) + type AITriageEvent struct + EventType workflowdom.TriggerType + FindingID shared.ID + TenantID shared.ID + TriageData map[string]any + TriageID shared.ID + type ActionHandler interface + Execute func(ctx context.Context, input *ActionInput) (map[string]any, error) + type ActionInput struct + ActionConfig map[string]any + ActionType workflowdom.ActionType + Context map[string]any + NodeKey string + RunID shared.ID + TenantID shared.ID + TriggerData map[string]any + WorkflowID shared.ID + type AddEdgeInput struct + Label string + SourceHandle string + SourceNodeKey string + TargetNodeKey string + TenantID shared.ID + UserID shared.ID + WorkflowID shared.ID + type AddNodeInput struct + Config workflowdom.NodeConfig + Description string + Name string + NodeKey string + NodeType workflowdom.NodeType + TenantID shared.ID + UIPositionX float64 + UIPositionY float64 + UserID shared.ID + WorkflowID shared.ID + type ConditionEvaluator interface + Evaluate func(ctx context.Context, expression string, data map[string]any) (bool, error) + type CreateEdgeInput struct + Label string + SourceHandle string + SourceNodeKey string + TargetNodeKey string + type CreateNodeInput struct + Config workflowdom.NodeConfig + Description string + Name string + NodeKey string + NodeType workflowdom.NodeType + UIPositionX float64 + UIPositionY float64 + type CreateWorkflowInput struct + Description string + Edges []CreateEdgeInput + Name string + Nodes []CreateNodeInput + Tags []string + TenantID shared.ID + UserID shared.ID + type DefaultConditionEvaluator struct + func (e *DefaultConditionEvaluator) Evaluate(ctx context.Context, expression string, data map[string]any) (bool, error) + type DefaultNotificationHandler struct + func (h *DefaultNotificationHandler) Send(ctx context.Context, input *NotificationInput) (map[string]any, error) + type ExecutionContext struct + CompletedNodeKeys map[string]bool + Context map[string]any + NodeRunsByKey map[string]*workflowdom.NodeRun + Run *workflowdom.Run + TriggerData map[string]any + Workflow *workflowdom.Workflow + func (ec *ExecutionContext) GetContextValue(key string) (any, bool) + func (ec *ExecutionContext) IsNodeCompleted(nodeKey string) bool + func (ec *ExecutionContext) MarkNodeCompleted(nodeKey string) + func (ec *ExecutionContext) SetContextValue(key string, value any) + type FindingActionHandler struct + func NewFindingActionHandler(vulnSvc *finding.VulnerabilityService, log *logger.Logger) *FindingActionHandler + func (h *FindingActionHandler) Execute(ctx context.Context, input *ActionInput) (map[string]any, error) + type FindingEvent struct + Changes map[string]any + EventType workflowdom.TriggerType + Finding *vulnerability.Finding + TenantID shared.ID + type HTTPRequestHandler struct + func NewHTTPRequestHandler(log *logger.Logger) *HTTPRequestHandler + func (h *HTTPRequestHandler) AllowLocalhostForTesting() + func (h *HTTPRequestHandler) Execute(ctx context.Context, input *ActionInput) (map[string]any, error) + func (h *HTTPRequestHandler) SetBlockedCIDRs(cidrs []string) + func (h *HTTPRequestHandler) SetClient(client *http.Client) + type ListWorkflowRunsInput struct + Page int + PerPage int + Status *workflowdom.RunStatus + TenantID shared.ID + WorkflowID *shared.ID + type ListWorkflowsInput struct + IsActive *bool + Page int + PerPage int + Search string + Tags []string + TenantID shared.ID + type NotificationHandler interface + Send func(ctx context.Context, input *NotificationInput) (map[string]any, error) + type NotificationInput struct + Context map[string]any + NodeKey string + NotificationConfig map[string]any + NotificationType workflowdom.NotificationType + RunID shared.ID + TenantID shared.ID + TriggerData map[string]any + WorkflowID shared.ID + type PipelineTriggerHandler struct + func NewPipelineTriggerHandler(pipelineSvc *pipeline.Service, scanSvc *scansvc.Service, log *logger.Logger) *PipelineTriggerHandler + func (h *PipelineTriggerHandler) Execute(ctx context.Context, input *ActionInput) (map[string]any, error) + type ScriptRunnerHandler struct + func NewScriptRunnerHandler(log *logger.Logger) *ScriptRunnerHandler + func (h *ScriptRunnerHandler) Execute(ctx context.Context, input *ActionInput) (map[string]any, error) + type TicketActionHandler struct + func NewTicketActionHandler(intSvc *integration.IntegrationService, log *logger.Logger) *TicketActionHandler + func (h *TicketActionHandler) Execute(ctx context.Context, input *ActionInput) (map[string]any, error) + type TriggerWorkflowInput struct + TenantID shared.ID + TriggerData map[string]any + TriggerType workflowdom.TriggerType + UserID shared.ID + WorkflowID shared.ID + type UpdateNodeInput struct + Config *workflowdom.NodeConfig + Description *string + Name *string + NodeID shared.ID + TenantID shared.ID + UIPositionX *float64 + UIPositionY *float64 + UserID shared.ID + WorkflowID shared.ID + type UpdateWorkflowGraphInput struct + Description *string + Edges []CreateEdgeInput + Name *string + Nodes []CreateNodeInput + Tags []string + TenantID shared.ID + UserID shared.ID + WorkflowID shared.ID + type UpdateWorkflowInput struct + Description *string + IsActive *bool + Name *string + Tags []string + TenantID shared.ID + UserID shared.ID + WorkflowID shared.ID + type WorkflowEventDispatcher struct + func NewWorkflowEventDispatcher(workflowRepo workflowdom.WorkflowRepository, ...) *WorkflowEventDispatcher + func (d *WorkflowEventDispatcher) DispatchAITriageCompleted(ctx context.Context, tenantID, findingID, triageID shared.ID, ...) + func (d *WorkflowEventDispatcher) DispatchAITriageEvent(ctx context.Context, event AITriageEvent) error + func (d *WorkflowEventDispatcher) DispatchAITriageFailed(ctx context.Context, tenantID, findingID, triageID shared.ID, ...) + func (d *WorkflowEventDispatcher) DispatchFindingEvent(ctx context.Context, event FindingEvent) error + func (d *WorkflowEventDispatcher) DispatchFindingsCreated(ctx context.Context, tenantID shared.ID, findings []*vulnerability.Finding) + type WorkflowExecutor struct + func NewWorkflowExecutor(workflowRepo workflowdom.WorkflowRepository, runRepo workflowdom.RunRepository, ...) *WorkflowExecutor + func (e *WorkflowExecutor) Execute(ctx context.Context, runID shared.ID) error + func (e *WorkflowExecutor) ExecuteAsync(runID shared.ID) + func (e *WorkflowExecutor) ExecuteAsyncWithTenant(runID shared.ID, tenantID shared.ID) + func (e *WorkflowExecutor) ExecuteWithTenant(ctx context.Context, runID shared.ID, expectedTenantID shared.ID) error + func (e *WorkflowExecutor) RegisterActionHandler(actionType workflowdom.ActionType, handler ActionHandler) + type WorkflowExecutorConfig struct + MaxConcurrentNodes int + MaxNodeExecutionTime time.Duration + func DefaultWorkflowExecutorConfig() WorkflowExecutorConfig + type WorkflowExecutorOption func(*WorkflowExecutor) + func WithExecutorAuditService(svc *auditapp.AuditService) WorkflowExecutorOption + func WithExecutorDB(db *sql.DB) WorkflowExecutorOption + func WithExecutorIntegrationService(svc *integration.IntegrationService) WorkflowExecutorOption + func WithExecutorOutboxService(svc *outbox.Service) WorkflowExecutorOption + type WorkflowService struct + func NewWorkflowService(workflowRepo workflowdom.WorkflowRepository, ...) *WorkflowService + func (s *WorkflowService) AddEdge(ctx context.Context, input AddEdgeInput) (*workflowdom.Edge, error) + func (s *WorkflowService) AddNode(ctx context.Context, input AddNodeInput) (*workflowdom.Node, error) + func (s *WorkflowService) CancelRun(ctx context.Context, tenantID, userID, runID shared.ID) error + func (s *WorkflowService) CreateWorkflow(ctx context.Context, input CreateWorkflowInput) (*workflowdom.Workflow, error) + func (s *WorkflowService) DeleteEdge(ctx context.Context, tenantID, workflowID, edgeID shared.ID) error + func (s *WorkflowService) DeleteNode(ctx context.Context, tenantID, workflowID, nodeID shared.ID) error + func (s *WorkflowService) DeleteWorkflow(ctx context.Context, tenantID, userID, workflowID shared.ID) error + func (s *WorkflowService) GetRun(ctx context.Context, tenantID, runID shared.ID) (*workflowdom.Run, error) + func (s *WorkflowService) GetWorkflow(ctx context.Context, tenantID, workflowID shared.ID) (*workflowdom.Workflow, error) + func (s *WorkflowService) ListRuns(ctx context.Context, input ListWorkflowRunsInput) (pagination.Result[*workflowdom.Run], error) + func (s *WorkflowService) ListWorkflows(ctx context.Context, input ListWorkflowsInput) (pagination.Result[*workflowdom.Workflow], error) + func (s *WorkflowService) TriggerWorkflow(ctx context.Context, input TriggerWorkflowInput) (*workflowdom.Run, error) + func (s *WorkflowService) UpdateNode(ctx context.Context, input UpdateNodeInput) (*workflowdom.Node, error) + func (s *WorkflowService) UpdateWorkflow(ctx context.Context, input UpdateWorkflowInput) (*workflowdom.Workflow, error) + func (s *WorkflowService) UpdateWorkflowGraph(ctx context.Context, input UpdateWorkflowGraphInput) (*workflowdom.Workflow, error) + type WorkflowServiceOption func(*WorkflowService) + func WithWorkflowAuditService(auditService *auditapp.AuditService) WorkflowServiceOption + func WithWorkflowExecutor(executor *WorkflowExecutor) WorkflowServiceOption