flowinstance

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2018 License: BSD-3-Clause Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	InternalError = "Internal DB Error"
)

Variables

View Source
var FLOW_NAMESPACE = "flow:"
View Source
var SNAPSHOTS_FLOWS_KEY = "snapshotFlows"
View Source
var SNAPSHOTS_NAMESPACE = "snapshots:"
View Source
var SNAPSHOT_NAMESPACE = "snapshot:"
View Source
var STEPS_NAMESPACE = "steps:"
View Source
var STEP_FLOWS_KEY = "stepFlows"
View Source
var STEP_NAMESPACE = "step:"

Functions

func AddTaskAndLinkDatas

func AddTaskAndLinkDatas(stepData StepData, rollupObj RollUpObj)

func DeleteFLow

func DeleteFLow(response http.ResponseWriter, request *http.Request, params httprouter.Params)

func DeleteFlow

func DeleteFlow(response http.ResponseWriter, request *http.Request, params httprouter.Params)

func DeleteSteps

func DeleteSteps(response http.ResponseWriter, request *http.Request, params httprouter.Params)

func FlowMetadata

func FlowMetadata(response http.ResponseWriter, request *http.Request, params httprouter.Params)

func FlowStatus

func FlowStatus(flowID string) (map[string]string, error)

func GetFlowSnapshot

func GetFlowSnapshot(response http.ResponseWriter, request *http.Request, params httprouter.Params)

func GetFlowStatus

func GetFlowStatus(response http.ResponseWriter, request *http.Request, params httprouter.Params)

func GetInstanceSteps

func GetInstanceSteps(response http.ResponseWriter, request *http.Request, params httprouter.Params)

func GetSnapshotStatus

func GetSnapshotStatus(response http.ResponseWriter, request *http.Request, params httprouter.Params)

func GetSnapshotStep

func GetSnapshotStep(response http.ResponseWriter, request *http.Request, params httprouter.Params)

func GetStep

func GetStep(id string) (map[string]string, error)

func HandleInternalError

func HandleInternalError(response http.ResponseWriter, err error)

func HandlerErrorResWithType

func HandlerErrorResWithType(response http.ResponseWriter, code int, err error, errorType string)

func HandlerErrorResponse

func HandlerErrorResponse(response http.ResponseWriter, code int, err error)

func ListAllFlowStatus

func ListAllFlowStatus(response http.ResponseWriter, request *http.Request, _ httprouter.Params)

func ListAllFlowStepIds

func ListAllFlowStepIds(response http.ResponseWriter, request *http.Request, params httprouter.Params)

func ListAlllStepData

func ListAlllStepData(response http.ResponseWriter, request *http.Request, params httprouter.Params)

func ListFlowStepData

func ListFlowStepData(response http.ResponseWriter, request *http.Request, params httprouter.Params)

func ListFlowSteps

func ListFlowSteps(response http.ResponseWriter, request *http.Request, params httprouter.Params)

func ListInstanceStatus

func ListInstanceStatus(response http.ResponseWriter, request *http.Request, _ httprouter.Params)

func ListRollup

func ListRollup(response http.ResponseWriter, request *http.Request, params httprouter.Params)

func ListRollupMetadata

func ListRollupMetadata(response http.ResponseWriter, request *http.Request, params httprouter.Params)

func ListSnapshots

func ListSnapshots(response http.ResponseWriter, request *http.Request, params httprouter.Params)

func ListStepData

func ListStepData(response http.ResponseWriter, request *http.Request, params httprouter.Params)

func ListSteps

func ListSteps(flowID string, withStatus bool) (map[string]interface{}, error)

func ListallFlowStpids

func ListallFlowStpids(flowID string) ([]string, error)

func POSTSnapshot

func POSTSnapshot(response http.ResponseWriter, request *http.Request, params httprouter.Params)

func Ping

func Ping(response http.ResponseWriter, request *http.Request, _ httprouter.Params)

func PostChange

func PostChange(response http.ResponseWriter, request *http.Request, _ httprouter.Params)

func SaveSteps

func SaveSteps(flowID string, id string, state string, status string, stepInfo string) (int64, error)

Types

type Attr

type Attr struct {
	ChgType int
	Att     Attribute `json:"Attribute"`
}

type Attribute

type Attribute struct {
	Name  string      `json:"name"`
	Type  string      `json:"type"`
	Value interface{} `json:"value"`
}

type Change

type Change struct {
	Name  string      `json:"name"`
	Type  string      `json:"type"`
	Value interface{} `json:"value"`
}

type ChangeObj

type ChangeObj struct {
	ID                   int64                  `json:"id"`
	Sequence             interface{}            `json:"sequence"`
	Change               Change                 `json:"change"`
	AdditionalProperties map[string]interface{} `json:"additionalProperties"`
}

type LdChange

type LdChange struct {
	ChgType  int64    `json:"ChgType"`
	ID       int64    `json:"ID"`
	LinkData LinkData `json:"LinkData"`
}

type LinkData

type LinkData struct {
	State  int64       `json:"state"`
	Attrs  interface{} `json:"attrs"`
	LinkId int64       `json:"linkId"`
}

type RollUpObj

type RollUpObj struct {
	ID                 int64        `json:"id"`
	Status             int64        `json:"status"`
	State              int64        `json:"state"`
	FlowURI            string       `json:"flowUri"`
	Snapshot           SnapshotData `json:"snapshot"`
	IgnoredTaskIds     []interface{}
	IgnoredLinkds      []int64
	IgnoredWorkitemIds []int64
	IgnoredAttrs       []string
}

func RollUP

func RollUP(flowId string, stepId int64) RollUpObj

func RollUp

func RollUp(id string) (RollUpObj, error)

func (RollUpObj) AddAttr

func (r RollUpObj) AddAttr(attr Attribute)
func (r RollUpObj) AddLink(linkData LinkData)

func (RollUpObj) AddTask

func (r RollUpObj) AddTask(taskData TaskData)

func (RollUpObj) AddWorkQueueItem

func (r RollUpObj) AddWorkQueueItem(workitem WorkItem)

func (RollUpObj) RemoveAttr

func (r RollUpObj) RemoveAttr(attr Attribute)
func (r RollUpObj) RemoveLink(linkId int64)

func (RollUpObj) RemoveTask

func (r RollUpObj) RemoveTask(taskId interface{})

func (RollUpObj) RemoveWorkQueueItem

func (r RollUpObj) RemoveWorkQueueItem(workitem WorkItem)

func (RollUpObj) UpdateAttr

func (r RollUpObj) UpdateAttr(attr Attribute)
func (r RollUpObj) UpdateLink(linkData LinkData)

func (RollUpObj) UpdateTask

func (r RollUpObj) UpdateTask(taskData TaskData)

func (RollUpObj) UpdateWorkQueueItem

func (r RollUpObj) UpdateWorkQueueItem(workitem WorkItem)

type RootTaskEnv

type RootTaskEnv struct {
	ID        interface{} `json:"id"`
	TaskId    interface{} `json:"taskId"`
	TaskDatas []TaskData  `json:"taskDatas"`
	LinkDatas []LinkData  `json:"linkDatas"`
}

type Snapshot

type Snapshot struct {
	ID           int64        `json:"id"`
	FlowID       string       `json:"flowID"`
	State        int64        `json:"state"`
	Status       int64        `json:"status"`
	SnapshotData SnapshotData `json:"SnapshotData"`
}

type SnapshotData

type SnapshotData struct {
	ID          string      `json:"id"`
	State       int64       `json:"state"`
	Status      int64       `json:"status"`
	Attrs       []Attribute `json:"attrs"`
	FlowURI     string      `json:"flowUri"`
	WorkQueue   []WorkItem  `json:"workQueue"`
	RootTaskEnv RootTaskEnv `json:"rootTaskEnv"`
}

type SnapshotInfo

type SnapshotInfo struct {
	ID           int64        `json:"id"`
	FlowID       string       `json:"flowID"`
	State        int64        `json:"state"`
	Status       int64        `json:"status"`
	Snapshot     SnapshotData `json:"snapshot"`
	Date         string       `json:"date"`
	SnapshotData SnapshotData `json:"snapshotData"`
}

type StateError

type StateError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Type    string `json:type`
}

func ConstructError

func ConstructError(err error, code int, errType string) StateError

type StepData

type StepData struct {
	Status    int64      `json:"status"`
	State     int64      `json:"state"`
	WqChanges []WqChange `json:"wqChanges"`
	TdChanges []TdChange `json:"tdChanges"`
	LdChanges []LdChange `json:"ldChanges"`
	Attrs     []Attr     `json:"attrs"`
}

type StepInfo

type StepInfo struct {
	FlowID   string   `json:"flowID"`
	ID       int64    `json:"id"`
	FlowURI  string   `json:"flowURI"`
	StepData StepData `json:"stepData"`
	Status   int64    `json:"status"`
	State    int64    `json:"state"`
	Date     string   `json:"date"`
}

type TaskData

type TaskData struct {
	State  int64       `json:"state"`
	Done   bool        `json:"done"`
	Attrs  interface{} `json:"attrs"`
	TaskId interface{} `json:"taskId"`
}

type TdChange

type TdChange struct {
	ChgType  int64       `json:"ChgType"`
	ID       interface{} `json:"ID"`
	TaskData TaskData    `json:"TaskData"`
}

type WorkItem

type WorkItem struct {
	ID       int64       `json:"id"`
	ExecType int64       `json:"execType"`
	TaskId   interface{} `json:"taskID"`
	Code     int64       `json:"code"`
}

type WorkQueue

type WorkQueue struct {
	ID       int64       `json:"id"`
	ExecType int64       `json:"execType"`
	Code     int64       `json:"code"`
	TaskId   interface{} `json:"taskID"`
}

type WqChange

type WqChange struct {
	ChgType int64       `json:"ChgType"`
	ID      interface{} `json:"ID"`
	Wtem    WorkItem    `json:"WorkItem"`
}

Jump to

Keyboard shortcuts

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