Documentation
¶
Index ¶
- type CreateFlowRequest
- type FlowDetailResponse
- type FlowResponse
- type PeerInput
- type PeerOutput
- type UpdateFlowRequest
- type Usecase
- func (u *Usecase) CreateFlow(ctx context.Context, req *CreateFlowRequest) (*FlowResponse, error)
- func (u *Usecase) DeleteFlow(ctx context.Context, tenantID, flowID string) error
- func (u *Usecase) DisableAction(ctx context.Context, tenantID, workflowID, key string) error
- func (u *Usecase) GetFlow(ctx context.Context, tenantID, flowID string) (*FlowDetailResponse, error)
- func (u *Usecase) ListFlows(ctx context.Context, tenantID string, page, pageSize int) (*spider.FlowListResponse, error)
- func (u *Usecase) UpdateAction(ctx context.Context, req *spider.UpdateActionRequest) (*spider.WorkflowAction, error)
- func (u *Usecase) UpdateFlow(ctx context.Context, req *UpdateFlowRequest) (*spider.Flow, error)
- type WorkflowActionInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateFlowRequest ¶
type CreateFlowRequest struct {
TenantID string `json:"tenant_id"`
Name string `json:"name"`
TriggerType spider.FlowTriggerType `json:"trigger_type"`
Meta map[string]string `json:"meta,omitempty"`
Actions []WorkflowActionInput `json:"actions"`
Peers []PeerInput `json:"peers"`
}
type FlowDetailResponse ¶
type FlowDetailResponse struct {
FlowID string `json:"flow_id"`
FlowName string `json:"flow_name"`
TenantID string `json:"tenant_id"`
TriggerType spider.FlowTriggerType `json:"trigger_type"`
Status spider.FlowStatus `json:"status"`
Version uint64 `json:"version"`
Meta map[string]string `json:"meta,omitempty"`
Actions []spider.WorkflowAction `json:"actions"`
Peers []PeerOutput `json:"peers"`
}
type FlowResponse ¶
type PeerOutput ¶ added in v1.3.7
type UpdateFlowRequest ¶
type UpdateFlowRequest struct {
TenantID string `json:"tenant_id"`
FlowID string `json:"flow_id"`
Name string `json:"name"`
TriggerType spider.FlowTriggerType `json:"trigger_type"`
Meta map[string]string `json:"meta,omitempty"`
Status spider.FlowStatus `json:"status"`
Actions []WorkflowActionInput `json:"actions,omitempty"`
Peers []PeerInput `json:"peers,omitempty"`
}
type Usecase ¶
type Usecase struct {
// contains filtered or unexported fields
}
func NewUsecase ¶
func NewUsecase(storage spider.WorkflowStorageAdapter) *Usecase
func (*Usecase) CreateFlow ¶
func (u *Usecase) CreateFlow(ctx context.Context, req *CreateFlowRequest) (*FlowResponse, error)
func (*Usecase) DeleteFlow ¶
func (*Usecase) DisableAction ¶
func (*Usecase) UpdateAction ¶
func (u *Usecase) UpdateAction(ctx context.Context, req *spider.UpdateActionRequest) (*spider.WorkflowAction, error)
func (*Usecase) UpdateFlow ¶
Click to show internal directories.
Click to hide internal directories.