Documentation
¶
Index ¶
Constants ¶
View Source
const SchemaFile = "flow-schema.json"
Variables ¶
View Source
var FlowNotFoundErr = errors.New("flow not found")
Functions ¶
func DeleteFlow ¶
func DeleteFlow(w http.ResponseWriter, r *http.Request)
Types ¶
type Flow ¶
type Flow struct {
UUID string `json:"-" bson:"uuid"`
Name string `json:"name" bson:"name"`
Description string `json:"description,omitempty" bson:"description,omitempty"`
Steps []Step `json:"steps,omitempty" bson:"steps,omitempty"`
}
Flow uses two different collections, one contains latest flows (one per name) and the the other is history collection containing all flows that have been added. Because mongo does NOT allow to update `_id` field we have to use custom `uuid` field, so we can update this field in flow collection to make replacing latest flow atomic. This uuid is the same in both collections for the latest flow.
type Repository ¶
type Step ¶
type Step struct {
Id string `json:"id,omitempty" bson:"id,omitempty"`
DependsOn []string `json:"dependsOn,omitempty" bson:"dependsOn,omitempty"`
Event Event `json:"event" bson:"event"`
Context map[string]string `json:"context,omitempty" bson:"context,omitempty"`
Criteria string `json:"criteria,omitempty" bson:"criteria,omitempty"`
Command Command `json:"command" bson:"command"`
}
Click to show internal directories.
Click to hide internal directories.