Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateFlowPayload ¶
type CreateFlowPayload struct {
Name string `json:"name" example:"My Workflow"`
TriggerType spider.FlowTriggerType `json:"trigger_type" example:"event"`
Meta map[string]string `json:"meta,omitempty"`
Actions []WorkflowAction `json:"actions"`
Peers []Peer `json:"peers"`
}
CreateFlowPayload represents the request body for creating a flow
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) CreateFlow ¶
CreateFlow godoc @Summary Create a new flow @Description Create a new workflow flow for a tenant @Tags flows @Accept json @Produce json @Param tenant_id path string true "Tenant ID" @Param payload body CreateFlowPayload true "Flow creation payload" @Success 200 {object} usecase.FlowResponse @Failure 400 {object} map[string]string @Failure 500 {object} map[string]string @Router /tenants/{tenant_id}/flows [post]
func (*Handler) DeleteFlow ¶
DeleteFlow godoc @Summary Delete a flow @Description Delete an existing flow @Tags flows @Param tenant_id path string true "Tenant ID" @Param flow_id path string true "Flow ID" @Success 204 @Failure 400 {object} map[string]string @Failure 500 {object} map[string]string @Router /tenants/{tenant_id}/flows/{flow_id} [delete]
func (*Handler) DisableAction ¶
DisableAction godoc @Summary Disable a workflow action @Description Disable a specific workflow action @Tags actions @Param tenant_id path string true "Tenant ID" @Param workflow_id path string true "Workflow ID" @Param key path string true "Action Key" @Success 200 @Failure 400 {object} map[string]string @Failure 500 {object} map[string]string @Router /tenants/{tenant_id}/workflows/{workflow_id}/actions/{key}/disable [post]
func (*Handler) GetFlow ¶
GetFlow godoc @Summary Get flow details @Description Get detailed information about a specific flow @Tags flows @Produce json @Param tenant_id path string true "Tenant ID" @Param id path string true "Flow ID" @Success 200 {object} usecase.FlowDetailResponse @Failure 400 {object} map[string]string @Failure 404 {object} map[string]string @Router /tenants/{tenant_id}/flows/{id} [get]
func (*Handler) ListFlows ¶
ListFlows godoc @Summary List flows @Description Get a paginated list of flows for a tenant @Tags flows @Produce json @Param tenant_id path string true "Tenant ID" @Param page query int false "Page number" default(1) @Param page_size query int false "Page size" default(20) @Success 200 {object} spider.FlowListResponse @Failure 400 {object} map[string]string @Failure 500 {object} map[string]string @Router /tenants/{tenant_id}/flows [get]
func (*Handler) UpdateFlow ¶
UpdateFlow godoc @Summary Update a flow @Description Update an existing flow's properties @Tags flows @Accept json @Produce json @Param tenant_id path string true "Tenant ID" @Param flow_id path string true "Flow ID" @Param payload body UpdateFlowPayload true "Flow update payload" @Success 200 {object} spider.Flow @Failure 400 {object} map[string]string @Failure 500 {object} map[string]string @Router /tenants/{tenant_id}/flows/{flow_id} [put]
type UpdateActionPayload ¶
type UpdateActionPayload struct {
Config map[string]interface{} `json:"config"`
Mapper map[string]spider.Mapper `json:"mapper"`
Meta map[string]string `json:"meta,omitempty"`
}
UpdateActionPayload represents the request body for updating an action
type UpdateFlowPayload ¶
type UpdateFlowPayload struct {
Name string `json:"name" example:"Updated Workflow"`
TriggerType spider.FlowTriggerType `json:"trigger_type" example:"schedule"`
Meta map[string]string `json:"meta,omitempty"`
Status spider.FlowStatus `json:"status" example:"active"`
}
UpdateFlowPayload represents the request body for updating a flow