Documentation ¶
Index ¶
- Variables
- func ToError(err error) error
- func ToSceneDo(info *RuleSceneInfo) *scene.Info
- type RuleAlarmDealRecord
- type RuleAlarmDealRecordModel
- type RuleAlarmInfo
- type RuleAlarmInfoModel
- type RuleAlarmLog
- type RuleAlarmLogModel
- type RuleAlarmRecord
- type RuleAlarmRecordModel
- type RuleAlarmScene
- type RuleAlarmSceneModel
- type RuleFlowInfo
- type RuleFlowInfoModel
- type RuleSceneInfo
- type RuleSceneInfoModel
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = sqlx.ErrNotFound
Functions ¶
func ToSceneDo ¶ added in v0.3.1
func ToSceneDo(info *RuleSceneInfo) *scene.Info
Types ¶
type RuleAlarmDealRecord ¶ added in v0.4.1
type RuleAlarmDealRecordModel ¶ added in v0.4.1
type RuleAlarmDealRecordModel interface { FindByFilter(ctx context.Context, filter alarm.DealRecordFilter, page *def.PageInfo) ([]*RuleAlarmDealRecord, error) CountByFilter(ctx context.Context, filter alarm.DealRecordFilter) (size int64, err error) // contains filtered or unexported methods }
RuleAlarmDealRecordModel is an interface to be customized, add more methods here, and implement the added methods in customRuleAlarmDealRecordModel.
func NewRuleAlarmDealRecordModel ¶ added in v0.4.1
func NewRuleAlarmDealRecordModel(conn sqlx.SqlConn) RuleAlarmDealRecordModel
NewRuleAlarmDealRecordModel returns a model for the database table.
type RuleAlarmInfo ¶ added in v0.4.1
type RuleAlarmInfo struct { Id int64 `db:"id"` // 编号 Name string `db:"name"` // 告警配置名称 Desc string `db:"desc"` // 告警配置说明 Level int64 `db:"level"` // 告警配置级别(1提醒 2一般 3严重 4紧急 5超紧急) Status int64 `db:"status"` // 状态 1:启用,2:禁用 CreatedTime time.Time `db:"createdTime"` // 创建时间 UpdatedTime time.Time `db:"updatedTime"` // 更新时间 DeletedTime sql.NullTime `db:"deletedTime"` }
type RuleAlarmInfoModel ¶ added in v0.4.1
type RuleAlarmInfoModel interface { FindByFilter(ctx context.Context, filter alarm.InfoFilter, page *def.PageInfo) ([]*RuleAlarmInfo, error) CountByFilter(ctx context.Context, filter alarm.InfoFilter) (size int64, err error) // contains filtered or unexported methods }
RuleAlarmInfoModel is an interface to be customized, add more methods here, and implement the added methods in customRuleAlarmInfoModel.
func NewRuleAlarmInfoModel ¶ added in v0.4.1
func NewRuleAlarmInfoModel(conn sqlx.SqlConn) RuleAlarmInfoModel
NewRuleAlarmInfoModel returns a model for the database table.
type RuleAlarmLog ¶ added in v0.4.1
type RuleAlarmLog struct { Id int64 `db:"id"` // 编号 AlarmRecordID int64 `db:"alarmRecordID"` // 告警记录ID Serial string `db:"serial"` // 告警流水 SceneName string `db:"sceneName"` // 场景名称 SceneID int64 `db:"sceneID"` // 场景ID Desc string `db:"desc"` // 告警说明 CreatedTime time.Time `db:"createdTime"` // 告警时间 }
type RuleAlarmLogModel ¶ added in v0.4.1
type RuleAlarmLogModel interface { FindByFilter(ctx context.Context, filter alarm.LogFilter, page *def.PageInfo) ([]*RuleAlarmLog, error) CountByFilter(ctx context.Context, filter alarm.LogFilter) (size int64, err error) // contains filtered or unexported methods }
RuleAlarmLogModel is an interface to be customized, add more methods here, and implement the added methods in customRuleAlarmLogModel.
func NewRuleAlarmLogModel ¶ added in v0.4.1
func NewRuleAlarmLogModel(conn sqlx.SqlConn) RuleAlarmLogModel
NewRuleAlarmLogModel returns a model for the database table.
type RuleAlarmRecord ¶ added in v0.4.1
type RuleAlarmRecord struct { Id int64 `db:"id"` // 编号 AlarmID int64 `db:"alarmID"` // 告警记录ID TriggerType int64 `db:"triggerType"` // 触发类型(设备触发1,其他2) ProductID string `db:"productID"` // 触发产品id DeviceName string `db:"deviceName"` // 触发设备名称 Level int64 `db:"level"` // 告警配置级别(1提醒 2一般 3严重 4紧急 5超紧急) SceneName string `db:"sceneName"` // 场景名称 SceneID int64 `db:"sceneID"` // 场景ID DealState int64 `db:"dealState"` // 告警记录状态(1无告警 2告警中 3已处理) LastAlarm time.Time `db:"lastAlarm"` // 最新告警时间 CreatedTime time.Time `db:"createdTime"` // 告警时间 }
type RuleAlarmRecordModel ¶ added in v0.4.1
type RuleAlarmRecordModel interface { FindByFilter(ctx context.Context, filter alarm.RecordFilter, page *def.PageInfo) ([]*RuleAlarmRecord, error) CountByFilter(ctx context.Context, filter alarm.RecordFilter) (size int64, err error) // contains filtered or unexported methods }
RuleAlarmRecordModel is an interface to be customized, add more methods here, and implement the added methods in customRuleAlarmRecordModel.
func NewRuleAlarmRecordModel ¶ added in v0.4.1
func NewRuleAlarmRecordModel(conn sqlx.SqlConn) RuleAlarmRecordModel
NewRuleAlarmRecordModel returns a model for the database table.
type RuleAlarmScene ¶ added in v0.4.1
type RuleAlarmSceneModel ¶ added in v0.4.1
type RuleAlarmSceneModel interface { FindByFilter(ctx context.Context, filter alarm.SceneFilter, page *def.PageInfo) ([]*RuleAlarmScene, error) CountByFilter(ctx context.Context, filter alarm.SceneFilter) (size int64, err error) DeleteByFilter(ctx context.Context, filter alarm.SceneFilter) error InsertMulti(ctx context.Context, alarmID int64, sceneIDs []int64) error // contains filtered or unexported methods }
RuleAlarmSceneModel is an interface to be customized, add more methods here, and implement the added methods in customRuleAlarmSceneModel.
func NewRuleAlarmSceneModel ¶ added in v0.4.1
func NewRuleAlarmSceneModel(conn sqlx.SqlConn) RuleAlarmSceneModel
NewRuleAlarmSceneModel returns a model for the database table.
type RuleFlowInfo ¶
type RuleFlowInfo struct { Id int64 `db:"id"` // id Name string `db:"name"` // 流的名称 Password string `db:"password"` // 登录密码 Desc string `db:"desc"` // 描述 IsDisabled int64 `db:"isDisabled"` // 是否禁用 1:是 2:否 CreatedTime time.Time `db:"createdTime"` // 创建时间 UpdatedTime time.Time `db:"updatedTime"` // 更新时间 DeletedTime sql.NullTime `db:"deletedTime"` // 删除时间,默认为空,表示未删除,非空表示已删除 }
type RuleFlowInfoModel ¶
type RuleFlowInfoModel interface {
// contains filtered or unexported methods
}
RuleFlowInfoModel is an interface to be customized, add more methods here, and implement the added methods in customRuleFlowInfoModel.
func NewRuleFlowInfoModel ¶
func NewRuleFlowInfoModel(conn sqlx.SqlConn) RuleFlowInfoModel
NewRuleFlowInfoModel returns a model for the database table.
type RuleSceneInfo ¶ added in v0.3.1
type RuleSceneInfo struct { Id int64 `db:"id"` // id Name string `db:"name"` // 场景名称 TriggerType string `db:"triggerType"` // 触发器类型 device: 设备触发 timer: 定时触发 manual:手动触发 Trigger sql.NullString `db:"trigger"` // 触发器内容-根据触发器类型改变 When sql.NullString `db:"when"` // 触发条件 Then sql.NullString `db:"then"` // 满足条件时执行的动作 Desc string `db:"desc"` // 描述 Status int64 `db:"status"` // 状态 1:启用,2:禁用 CreatedTime time.Time `db:"createdTime"` // 创建时间 UpdatedTime time.Time `db:"updatedTime"` // 更新时间 DeletedTime sql.NullTime `db:"deletedTime"` // 删除时间,默认为空,表示未删除,非空表示已删除 }
func ToScenePo ¶ added in v0.3.1
func ToScenePo(info *scene.Info) *RuleSceneInfo
type RuleSceneInfoModel ¶ added in v0.3.1
RuleSceneInfoModel is an interface to be customized, add more methods here, and implement the added methods in customRuleSceneInfoModel.
func NewRuleSceneInfoModel ¶ added in v0.3.1
func NewRuleSceneInfoModel(conn sqlx.SqlConn) RuleSceneInfoModel
NewRuleSceneInfoModel returns a model for the database table.
Source Files ¶
- assemble.go
- rulealarmdealrecordmodel.go
- rulealarmdealrecordmodel_gen.go
- rulealarminfomodel.go
- rulealarminfomodel_gen.go
- rulealarmlogmodel.go
- rulealarmlogmodel_gen.go
- rulealarmrecordmodel.go
- rulealarmrecordmodel_gen.go
- rulealarmscenemodel.go
- rulealarmscenemodel_gen.go
- ruleflowinfomodel.go
- ruleflowinfomodel_gen.go
- rulesceneinfomodel.go
- rulesceneinfomodel_gen.go
- vars.go