Documentation
¶
Index ¶
Constants ¶
View Source
const ( // TriggerTypeSchedule 触发器:时间表 TriggerTypeSchedule triggerType = "schedule" // TriggerTypeDevicePoint 触发器:设备点位 TriggerTypeDevicePoint triggerType = "devicePoint" // TriggerTypeDeviceEvent 触发器:设备事件 TriggerTypeDeviceEvent triggerType = "deviceEvent" // ConditionTypeDevicePoint 执行条件:设备点位 ConditionTypeDevicePoint conditionType = "devicePoint" //执行条件:有些运行时间段 ConditionExecuteTime conditionType = "executeTime" // ConditionLastTime 执行条件 持续时间 ConditionLastTime conditionType = "lastTime" // ConditionDateInterval 日期间隔,示例:01-01 ~ 05-01 // Deprecated: 已废弃,请拆分为多个条件,例如:年(数组)、月(数组)、日(数组)、周(数组)、时间段(数组) ConditionDateInterval conditionType = "dateInterval" // ConditionYears 执行条件-年(数组) ConditionYears conditionType = "years" // ConditionMonths 执行条件-月(数组) ConditionMonths conditionType = "months" // ConditionDays 执行条件-日(数组) ConditionDays conditionType = "days" // ConditionWeeks 执行条件-周(数组) ConditionWeeks conditionType = "weeks" // ConditionTimes 执行条件-时间段(数组) ConditionTimes conditionType = "times" // 执行类型:设置设备点位 ActionTypeDevicePoint ActionType = "devicePoint" // 执行类型:触发场景联动 ActionTypeLinkEdge ActionType = "linkEdge" ConditionEq conditionSymbol = "=" ConditionNe conditionSymbol = "!=" ConditionGt conditionSymbol = ">" ConditionGe conditionSymbol = ">=" ConditionLt conditionSymbol = "<" ConditionLe conditionSymbol = "<=" EventCodeLinkEdgeTrigger = "linkEdgeTrigger" //场景联动执行结果:全部成功、部分成功、全部失败 LinkEdgeExecuteResultAllSuccess = "success" LinkEdgeExecuteResultPartSuccess = "partSuccess" LinkEdgeExecuteResultAllFail = "fail" )
View Source
const (
LinkConfigPath = "./config/linkedge" // 场景联动配置路径
)
Variables ¶
View Source
var ActionListIsEmptyErr = errors.New("linkEdge action list cannot be empty")
ActionListIsEmptyErr action 列表为空错误
Functions ¶
This section is empty.
Types ¶
type ActionType ¶
type ActionType string
type BaseResponse ¶
type ModelConfig ¶
type ModelConfig struct { //场景ID Id string `json:"id,omitempty"` //是否可用 Enable bool `json:"enable"` //场景名称 Name string `json:"name"` //场景标签 Tags []string `json:"tags"` // 场景描述 Description string `json:"description"` // 静默期,单位:秒 SilentPeriod int64 `json:"silentPeriod"` // 触发器 Trigger []interface{} `json:"trigger"` // 场景联动的执行条件 Condition []interface{} `json:"condition"` // 执行动作 Action []interface{} `json:"action"` // contains filtered or unexported fields }
场景联动配置模型
Click to show internal directories.
Click to hide internal directories.