Documentation ¶
Index ¶
- Constants
- type Connection
- type Device
- type DeviceAction
- type DeviceState
- type Flow
- type FlowElement
- type FlowElementGraphSettings
- type FlowElementGraphSettingsPosition
- type Image
- type ImageFilterList
- type Log
- type LogQuery
- type Map
- type MapDevice
- type MapDeviceAction
- type MapDeviceState
- type MapElement
- type MapElementGraphSettings
- type MapElementGraphSettingsPosition
- type MapImage
- type MapLayer
- type MapOptions
- type MapText
- type Node
- type Permission
- type Prototype
- type RedactorConnector
- type RedactorFlow
- type RedactorGrapSettings
- type RedactorObject
- type Role
- type Script
- type SortMapElement
- type SortMapElementByWeight
- type SortMapLayer
- type SortMapLayersByWeight
- type User
- type UserHistory
- type UserMeta
- type Variable
- type Worker
- type Workflow
- type WorkflowScenario
Constants ¶
View Source
const HistoryMax = 8
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct { Uuid uuid.UUID `json:"uuid"` Name string `json:"name" valid:"MaxSize(254)"` ElementFrom uuid.UUID `json:"element_from" valid:"Required"` ElementTo uuid.UUID `json:"element_to" valid:"Required"` PointFrom int64 `json:"point_from" valid:"Required"` PointTo int64 `json:"point_to" valid:"Required"` Flow *Flow `json:"flow"` FlowId int64 `json:"flow_id" valid:"Required"` Direction string `json:"direction"` GraphSettings json.RawMessage `json:"graph_settings"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
func (*Connection) Valid ¶
func (d *Connection) Valid() (ok bool, errs []*validation.Error)
type Device ¶
type Device struct { Id int64 `json:"id"` Name string `json:"name" valid:"MaxSize(254);Required"` Description string `json:"description" valid:"MaxSize(254)"` Status string `json:"status" valid:"MaxSize(254)"` Device *Device `json:"device"` DeviceId *int64 `json:"device_id"` Node *Node `json:"node"` Type DeviceType `json:"type"` Properties json.RawMessage `json:"properties" valid:"Required"` States []*DeviceState `json:"states"` Actions []*DeviceAction `json:"actions"` Devices []*Device `json:"devices"` IsGroup bool `json:"is_group"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
func (*Device) SetProperties ¶
func (d *Device) SetProperties(properties interface{}) (ok bool, errs []*validation.Error)
func (*Device) SetPropertiesFromMap ¶
type DeviceAction ¶
type DeviceAction struct { Id int64 `json:"id"` Name string `json:"name" valid:"MaxSize(254);Required"` Description string `json:"description"` Device *Device `json:"device"` DeviceId int64 `json:"device_id" valid:"Required"` Script *Script `json:"script"` ScriptId int64 `json:"script_id" valid:"Required"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
func (*DeviceAction) Valid ¶
func (d *DeviceAction) Valid() (ok bool, errs []*validation.Error)
type DeviceState ¶
type DeviceState struct { Id int64 `json:"id"` Description string `json:"description"` SystemName string `json:"system_name" valid:"MaxSize(254);Required"` Device *Device `json:"device"` DeviceId int64 `json:"device_id" valid:"Required"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
func (*DeviceState) Valid ¶
func (d *DeviceState) Valid() (ok bool, errs []*validation.Error)
type Flow ¶
type Flow struct { Id int64 `json:"id"` Name string `json:"name" valid:"MaxSize(254);Required"` Description string `json:"description" valid:"MaxSize(254)"` Status StatusType `json:"status" valid:"Required"` Workflow *Workflow `json:"workflow"` WorkflowId int64 `json:"workflow_id" valid:"Required"` WorkflowScenarioId int64 `json:"workflow_scenario_id" valid:"Required"` Connections []*Connection `json:"connections"` FlowElements []*FlowElement `json:"flow_elements"` Workers []*Worker `json:"workers"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type FlowElement ¶
type FlowElement struct { Uuid uuid.UUID `json:"uuid"` Name string `json:"name" valid:"MaxSize(254)"` Description string `json:"description"` FlowId int64 `json:"flow_id" valid:"Required"` Script *Script `json:"script"` ScriptId *int64 `json:"script_id"` Status StatusType `json:"status" valid:"Required"` FlowLink *int64 `json:"flow_link"` PrototypeType FlowElementsPrototypeType `json:"prototype_type" valid:"Required"` GraphSettings FlowElementGraphSettings `json:"graph_settings"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
func (*FlowElement) Valid ¶
func (d *FlowElement) Valid() (ok bool, errs []*validation.Error)
type FlowElementGraphSettings ¶
type FlowElementGraphSettings struct {
Position FlowElementGraphSettingsPosition `json:"position"`
}
type Image ¶
type ImageFilterList ¶
type Log ¶
type Map ¶
type Map struct { Id int64 `json:"id"` Name string `json:"name" valid:"MaxSize(254);Required"` Description string `json:"description" valid:"Required"` Options MapOptions `json:"options"` Layers []*MapLayer `json:"layers"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type MapDevice ¶
type MapDevice struct { Id int64 `json:"id"` SystemName string `json:"system_name" valid:"Required"` Device *Device `json:"device"` DeviceId int64 `json:"device_id" valid:"Required"` Image *Image `json:"image"` ImageId int64 `json:"image_id"` Actions []*MapDeviceAction `json:"actions"` States []*MapDeviceState `json:"states"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type MapDeviceAction ¶
type MapDeviceAction struct { Id int64 `json:"id"` DeviceAction *DeviceAction `json:"device_action"` DeviceActionId int64 `json:"device_action_id" valid:"Required"` MapDeviceId int64 `json:"map_device_id" valid:"Required"` Image *Image `json:"image"` ImageId int64 `json:"image_id" valid:"Required"` Type string `json:"type"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
func (*MapDeviceAction) Valid ¶
func (m *MapDeviceAction) Valid() (ok bool, errs []*validation.Error)
type MapDeviceState ¶
type MapDeviceState struct { Id int64 `json:"id"` DeviceState *DeviceState `json:"device_state"` DeviceStateId int64 `json:"device_state_id" valid:"Required"` MapDeviceId int64 `json:"map_device_id" valid:"Required"` Image *Image `json:"image"` ImageId int64 `json:"image_id" valid:"Required"` Style string `json:"style"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
func (*MapDeviceState) Valid ¶
func (m *MapDeviceState) Valid() (ok bool, errs []*validation.Error)
type MapElement ¶
type MapElement struct { Id int64 `json:"id"` Name string `json:"name" valid:"Required"` Description string `json:"description"` PrototypeId int64 `json:"prototype_id"` PrototypeType PrototypeType `json:"prototype_type"` Prototype Prototype `json:"prototype" valid:"Required"` MapId int64 `json:"map_id" valid:"Required"` LayerId int64 `json:"layer_id" valid:"Required"` GraphSettings MapElementGraphSettings `json:"graph_settings"` Status StatusType `json:"status" valid:"Required"` Weight int64 `json:"weight"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
func (*MapElement) Valid ¶
func (m *MapElement) Valid() (ok bool, errs []*validation.Error)
type MapElementGraphSettings ¶
type MapElementGraphSettings struct { Width null.Int64 `json:"width"` Height null.Int64 `json:"height"` Position MapElementGraphSettingsPosition `json:"position"` }
type MapImage ¶
type MapLayer ¶
type MapLayer struct { Id int64 `json:"id"` Name string `json:"name" valid:"MaxSize(254);Required"` Description string `json:"description"` Map *Map `json:"map"` MapId int64 `json:"map_id" valid:"Required"` Status string `json:"status" valid:"Required"` Weight int64 `json:"weight"` Elements []*MapElement `json:"elements"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type MapOptions ¶
type MapText ¶
type Node ¶
type Node struct { Id int64 `json:"id"` Name string `json:"name" valid:"MaxSize(254);Required"` Ip string `json:"ip" valid:"IP;Required"` // Must be a valid IPv4 address Port int `json:"port" valid:"Range(1, 65535);Required"` Status string `json:"status" valid:"Required"` Description string `json:"description"` Login string `json:"login" valid:"MaxSize(254);Required"` Password string `json:"password"` EncryptedPassword string `json:"encrypted_password"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type Permission ¶
type RedactorConnector ¶
type RedactorConnector struct { Id uuid.UUID `json:"id"` Start struct { Object uuid.UUID `json:"object"` Point int64 `json:"point"` } `json:"start"` End struct { Object uuid.UUID `json:"object"` Point int64 `json:"point"` } `json:"end"` FlowType string `json:"flow_type"` Title string `json:"title"` Direction string `json:"direction"` }
type RedactorFlow ¶
type RedactorFlow struct { Id int64 `json:"id"` Name string `json:"name"` Description string `json:"description"` Status StatusType `json:"status"` Objects []*RedactorObject `json:"objects"` Connectors []*RedactorConnector `json:"connectors"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"update_at"` Workflow *Workflow `json:"workflow"` Scenario *WorkflowScenario `json:"scenario"` Workers []*Worker `json:"workers"` }
type RedactorGrapSettings ¶
type RedactorObject ¶
type RedactorObject struct { Id uuid.UUID `json:"id"` Type struct { Name string `json:"name"` Start interface{} `json:"start"` End interface{} `json:"end"` Status string `json:"status"` Action string `json:"action"` } `json:"type"` Position struct { Top int64 `json:"top"` Left int64 `json:"left"` } `json:"position"` Status string `json:"status"` Error string `json:"error"` Title string `json:"title"` Description string `json:"description"` PrototypeType FlowElementsPrototypeType `json:"prototype_type"` Script *Script `json:"script"` FlowLink *Flow `json:"flow_link"` }
type Role ¶
type Role struct { Name string `json:"name" valid:"MaxSize(254);Required"` Description string `json:"description"` Parent *Role `json:"parent"` Children []*Role `json:"children"` AccessList map[string][]string `json:"access_list"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type Script ¶
type Script struct { Id int64 `json:"id"` Lang ScriptLang `json:"lang" valid:"Required"` Name string `json:"name" valid:"MaxSize(254);Required"` Source string `json:"source"` Description string `json:"description"` Compiled string `json:"-"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type SortMapElement ¶
type SortMapElementByWeight ¶
type SortMapElementByWeight []*MapElement
func (SortMapElementByWeight) Len ¶
func (l SortMapElementByWeight) Len() int
func (SortMapElementByWeight) Less ¶
func (l SortMapElementByWeight) Less(i, j int) bool
func (SortMapElementByWeight) Swap ¶
func (l SortMapElementByWeight) Swap(i, j int)
type SortMapLayer ¶
type SortMapLayersByWeight ¶
type SortMapLayersByWeight []*MapLayer
func (SortMapLayersByWeight) Len ¶
func (l SortMapLayersByWeight) Len() int
func (SortMapLayersByWeight) Less ¶
func (l SortMapLayersByWeight) Less(i, j int) bool
func (SortMapLayersByWeight) Swap ¶
func (l SortMapLayersByWeight) Swap(i, j int)
type User ¶
type User struct { Id int64 `json:"id"` Nickname string `json:"nickname" valid:"Required;MinSize(3);MaxSize(255)"` FirstName string `json:"first_name" valid:"MaxSize(255)"` LastName string `json:"last_name" valid:"MaxSize(255)"` EncryptedPassword string `json:"encrypted_password,omitempty"` Email string `json:"email" valid:"Required;Email"` Status string `json:"status" valid:"MaxSize(255)"` ResetPasswordToken string `json:"-,omitempty"` AuthenticationToken string `json:"authentication_token,omitempty"` Image *Image `json:"image,omitempty"` ImageId sql.NullInt64 `json:"image_id"` SignInCount int64 `json:"sign_in_count,omitempty"` CurrentSignInIp string `json:"current_sign_in_ip,omitempty"` LastSignInIp string `json:"last_sign_in_ip,omitempty"` Lang string `json:"lang"` User *User `json:"user,omitempty"` UserId sql.NullInt64 `json:"user_id"` Role *Role `json:"role"` RoleName string `json:"role_name,omitempty"` Meta []*UserMeta `json:"meta,omitempty"` ResetPasswordSentAt *time.Time `json:"reset_password_sent_at,omitempty"` CurrentSignInAt *time.Time `json:"current_sign_in_at,omitempty"` LastSignInAt *time.Time `json:"last_sign_in_at,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` DeletedAt *time.Time `json:"deleted_at"` History []*UserHistory `json:"history,omitempty"` }
type UserHistory ¶
type Worker ¶
type Worker struct { Id int64 `json:"id"` Name string `json:"name" valid:"MaxSize(254);Required"` Time string `json:"time" valid:"Required"` Status string `json:"status" valid:"Required"` Workflow *Workflow `json:"workflow"` WorkflowId int64 `json:"workflow_id" valid:"Required"` Flow *Flow `json:"flow"` FlowId int64 `json:"flow_id" valid:"Required"` DeviceAction *DeviceAction `json:"device_action"` DeviceActionId int64 `json:"device_action_id" valid:"Required"` Workers []*Worker `json:"workers"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type Workflow ¶
type Workflow struct { Id int64 `json:"id"` Name string `json:"name" valid:"MaxSize(254);Required"` Description string `json:"description"` Status string `json:"status" valid:"Required"` Flows []*Flow `json:"flows"` Scripts []*Script `json:"scripts"` Scenario *WorkflowScenario `json:"scenario" valid:"Required"` Scenarios []*WorkflowScenario `json:"scenarios"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type WorkflowScenario ¶
type WorkflowScenario struct { Id int64 `json:"id"` Name string `json:"name" valid:"MaxSize(254);Required"` SystemName string `json:"system_name" valid:"MaxSize(254);Required"` WorkflowId int64 `json:"workflow_id" valid:"Required"` Scripts []*Script `json:"scripts"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
func (*WorkflowScenario) Valid ¶
func (d *WorkflowScenario) Valid() (ok bool, errs []*validation.Error)
Source Files ¶
- device.go
- device_action.go
- device_state.go
- flow.go
- flow_connection.go
- flow_element.go
- image.go
- log.go
- map.go
- map_device.go
- map_device_action.go
- map_device_state.go
- map_element.go
- map_image.go
- map_layer.go
- map_text.go
- models.go
- node.go
- permission.go
- redactor.go
- role.go
- script.go
- user.go
- userhistory.go
- usermeta.go
- variable.go
- worker.go
- workflow.go
- workflow_scenario.go
Click to show internal directories.
Click to hide internal directories.