model

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionDef

type ActionDef struct {
	Id             int              `json:"id"`
	Type           string           `json:"type"`
	Name           string           `json:"name"`
	InputParams    map[string]any   `json:"parameters"`
	Next           map[string][]int `json:"next"`
	Expression     string           `json:"expression"`
	Join           int              `json:"join"`
	DelaySeconds   int              `json:"delaySeconds"`
	Event          string           `json:"event"`
	TimeoutSeconds int              `json:"timeoutSeconds"`
}

type ActionDefinition

type ActionDefinition struct {
	Name              string      `json:"name"`
	RetryCount        int         `json:"retry_count"`
	RetryAfterSeconds int         `json:"retry_after_seconds"`
	RetryPolicy       RetryPolicy `json:"retry_policy"`
	TimeoutSeconds    int         `json:"timeout_seconds"`
}

type ActionExecutionRequest

type ActionExecutionRequest struct {
	WorkflowName string
	FlowId       string
	ActionId     int
	ActionName   string
	ActionType   ActionType
}

type ActionType

type ActionType string
const ACTION_TYPE_SYSTEM ActionType = "SYSTEM"
const ACTION_TYPE_USER ActionType = "USER"

type FlowContext

type FlowContext struct {
	Id               string         `json:"id"`
	CurrentActionIds map[int]int    `json:"currentActionIds"`
	Data             map[string]any `json:"data"`
	State            FlowState      `json:"flowState"`
	Event            string         `json:"event"`
	ExecutedActions  map[int]bool   `json:"executedActions"`
}

type FlowExecutionRequest

type FlowExecutionRequest struct {
	WorkflowName string
	FlowId       string
	Event        string
	ActionId     int
	DataMap      map[string]any
	RequestType  FlowExecutionType
}

type FlowExecutionType

type FlowExecutionType string
const NEW_FLOW_EXECUTION FlowExecutionType = "NEW"
const RESUME_FLOW_EXECUTION FlowExecutionType = "RESUME"
const RETRY_FLOW_EXECUTION FlowExecutionType = "RETRY"
const SYSTEM_FLOW_EXECUTION FlowExecutionType = "SYSTEM"

type FlowState

type FlowState string
const COMPLETED FlowState = "C"
const FAILED FlowState = "F"
const PAUSED FlowState = "P"
const RUNNING FlowState = "R"
const WAITING_DELAY FlowState = "WD"
const WAITING_EVENT FlowState = "WE"

type FlowStateChangeRequest

type FlowStateChangeRequest struct {
	WorkflowName string
	FlowId       string
	State        FlowState
}

type RetryPolicy

type RetryPolicy string
const RETRY_POLICY_BACKOFF RetryPolicy = "BACKOFF"
const RETRY_POLICY_FIXED RetryPolicy = "FIXED"

type Workflow

type Workflow struct {
	Name       string      `json:"name"`
	RootAction int         `json:"rootAction"`
	Actions    []ActionDef `json:"actions"`
	OnFailure  string      `json:"onFailure"`
	OnSuccess  string      `json:"onSuccess"`
}

type WorkflowEvent

type WorkflowEvent struct {
	Name   string `json:"name"`
	FlowId string `json:"flowId"`
	Event  string `json:"event"`
}

type WorkflowRequest

type WorkflowRequest struct {
	Name   string `json:"name"`
	FlowId string `json:"flowId"`
}

type WorkflowRunRequest

type WorkflowRunRequest struct {
	Name  string         `json:"name"`
	Input map[string]any `json:"input"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL