IOTError

package
v5.1.38 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(args *ArgsCreate) (err error)

Create 创建新的错误

func DeleteByID

func DeleteByID(args *ArgsDeleteByID) (err error)

DeleteByID 删除错误信息

func Run

func Run()

func UpdateDone

func UpdateDone(args *ArgsUpdateDone) (err error)

UpdateDone 标记错误处理

Types

type ArgsCreate

type ArgsCreate struct {
	//是否推送了预警信息
	SendEW bool `db:"send_ew" json:"sendEW"`
	//组织ID
	// 设备所属的组织,也可能为0
	OrgID int64 `db:"org_id" json:"orgID"`
	//设备分组
	GroupID int64 `db:"group_id" json:"groupID"`
	//设备ID
	DeviceID int64 `db:"device_id" json:"deviceID"`
	//错误标识码
	Code string `db:"code" json:"code"`
	//日志内容
	Content string `db:"content" json:"content"`
	//扩展参数
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

ArgsCreate 创建新的错误参数

type ArgsDeleteByID

type ArgsDeleteByID struct {
	//IDs
	IDs pq.Int64Array `db:"ids" json:"ids" check:"ids"`
	//组织ID
	// 用于检查
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
}

ArgsDeleteByID 删除错误信息参数

type ArgsGetAnalysisError

type ArgsGetAnalysisError struct {
	//查询时间范围
	TimeBetween CoreSQLTime.FieldsCoreTime `json:"timeBetween"`
	//结构方式
	// year / month / day / hour
	TimeType string `json:"timeType" check:"mark"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//设备分组
	GroupID int64 `db:"group_id" json:"groupID" check:"id" empty:"true"`
}

ArgsGetAnalysisError 设备发生故障总数参数

type ArgsGetList

type ArgsGetList struct {
	//分页
	Pages CoreSQLPages.ArgsDataList `json:"pages"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//设备分组
	GroupID int64 `db:"group_id" json:"groupID" check:"id" empty:"true"`
	//设备ID
	DeviceID int64 `db:"device_id" json:"deviceID" check:"id" empty:"true"`
	//是否已经处理
	AllowDone bool `db:"allow_done" json:"allowDone" check:"bool"`
	Done      bool `db:"done" json:"done" check:"bool"`
	//是否推送了预警信息
	AllowSendEW bool `db:"allow_send_ew" json:"allowSendEW" check:"bool"`
	SendEW      bool `db:"send_ew" json:"sendEW" check:"bool"`
	//时间段
	TimeBetween CoreSQLTime.FieldsCoreTime `json:"timeBetween"`
	//是否为历史
	IsHistory bool `json:"is_history" check:"bool"`
	//搜索
	Search string `json:"search" check:"search" empty:"true"`
}

ArgsGetList 获取错误列表参数

type ArgsUpdateDone

type ArgsUpdateDone struct {
	//IDs
	IDs pq.Int64Array `db:"ids" json:"ids" check:"ids"`
	//组织ID
	// 用于检查
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
}

ArgsUpdateDone 标记错误处理参数

type DataGetAnalysisError

type DataGetAnalysisError struct {
	//时间
	DayTime string `db:"d" json:"dayTime"`
	//数据
	Data int64 `db:"data" json:"data"`
}

func GetAnalysisError

func GetAnalysisError(args *ArgsGetAnalysisError) (dataList []DataGetAnalysisError, err error)

GetAnalysisError 设备发生故障总数

type FieldsAnalysis

type FieldsAnalysis struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt"`
	//组织ID
	// 设备所属的组织,也可能为0
	OrgID int64 `db:"org_id" json:"orgID"`
	//设备分组
	GroupID int64 `db:"group_id" json:"groupID"`
	//发生次数
	Count int64 `db:"count" json:"count"`
}

type FieldsError

type FieldsError struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt"`
	//是否已经处理
	Done bool `db:"done" json:"done"`
	//是否推送了预警信息
	SendEW bool `db:"send_ew" json:"sendEW"`
	//组织ID
	// 设备所属的组织,也可能为0
	OrgID int64 `db:"org_id" json:"orgID"`
	//设备分组
	GroupID int64 `db:"group_id" json:"groupID"`
	//设备ID
	DeviceID int64 `db:"device_id" json:"deviceID"`
	//错误标识码
	Code string `db:"code" json:"code"`
	//日志内容
	Content string `db:"content" json:"content"`
	//扩展参数
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

func GetList

func GetList(args *ArgsGetList) (dataList []FieldsError, dataCount int64, err error)

GetList 获取错误列表

Jump to

Keyboard shortcuts

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