Initial commit
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
package proto
|
||||
|
||||
import (
|
||||
"stat/common/statutils"
|
||||
"stat/models/monitormod"
|
||||
"time"
|
||||
)
|
||||
|
||||
type MonitorSearch struct {
|
||||
Name *string `json:"name" bson:"name"` // 分类名称
|
||||
AppId *int32 `json:"appId" bson:"appId"` // appId
|
||||
Status *bool `json:"status" bson:"status"` // 是否启用
|
||||
Device *statutils.DeviceName `json:"device" bson:"device"` // 设备类型
|
||||
Category *monitormod.MonitorCategory `json:"category" bson:"category"` // 监控分类
|
||||
PageNum int64 `json:"pageNum"`
|
||||
PageSize int64 `json:"pageSize"`
|
||||
}
|
||||
|
||||
type MonitorSearchResp struct {
|
||||
Total int64 `json:"total"`
|
||||
List monitormod.MonitorList `json:"list"`
|
||||
}
|
||||
|
||||
type MonitorUpdate struct {
|
||||
Name *string `json:"name" bson:"name,omitempty"` // 分类名称
|
||||
AppId *int32 `bson:"appId" json:"appId,omitempty"` // appId
|
||||
Status *bool `json:"status" bson:"status,omitempty"` // 是否启用
|
||||
Category *monitormod.MonitorCategory `bson:"category" json:"category"` // 分类
|
||||
Device *statutils.DeviceName `bson:"device" json:"device"` // 设备
|
||||
Duration *int64 `bson:"duration" json:"duration"` // 时间段,单位分钟
|
||||
Compare *monitormod.Compare `bson:"compare" json:"compare"` // 比较
|
||||
Threshold *int64 `bson:"threshold" json:"threshold"` // 阀值
|
||||
Comment *string `bson:"comment" json:"comment"` // 注释
|
||||
UpdatedAt *time.Time `json:"updatedAt" bson:"updatedAt,omitempty"` // 更新时间
|
||||
}
|
||||
|
||||
type MonitorUpdateReq struct {
|
||||
Id string `json:"id" binding:"required"`
|
||||
Param *MonitorUpdate `json:"param" binding:"required"` // 参数
|
||||
}
|
||||
type MonitorAddReq struct {
|
||||
monitormod.Monitor
|
||||
}
|
||||
type MonitorDelReq struct {
|
||||
Id string `json:"id"`
|
||||
}
|
||||
Reference in New Issue
Block a user