IOTLog

package
v5.1.42 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Append

func Append(args *ArgsAppend)

Append 推送新的日志

func Run

func Run()

Types

type ArgsAppend

type ArgsAppend struct {
	//组织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"`
	//行为标识码
	Mark string `db:"mark" json:"mark" check:"mark"`
	//日志内容
	Content string `db:"content" json:"content" check:"des" min:"1" max:"1000"`
}

ArgsAppend 推送新的日志参数

type ArgsGetByID

type ArgsGetByID struct {
	//ID
	ID int64 `json:"id" check:"id"`
	//组织ID
	// 用于检查
	OrgID int64 `json:"orgID" check:"id" empty:"true"`
}

ArgsGetByID 查看日志详情参数

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"`
	//时间段
	TimeBetween CoreSQLTime.FieldsCoreTime `json:"timeBetween"`
	//是否为历史
	IsHistory bool `json:"is_history" check:"bool"`
	//搜索
	Search string `json:"search" check:"search" empty:"true"`
}

ArgsGetList 获取日志列表参数

type FieldsLog

type FieldsLog 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"`
	//设备ID
	DeviceID int64 `db:"device_id" json:"deviceID"`
	//行为标识码
	Mark string `db:"mark" json:"mark"`
	//日志内容
	Content string `db:"content" json:"content"`
}

FieldsLog 设备日志

func GetByID

func GetByID(args *ArgsGetByID) (data FieldsLog, err error)

GetByID 查看日志详情

func GetList

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

GetList 获取日志列表

Jump to

Keyboard shortcuts

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