2023-01-06 10:09:23 +08:00
|
|
|
package proto
|
|
|
|
|
2023-03-23 18:03:09 +08:00
|
|
|
import "hpds-iot-web/model"
|
|
|
|
|
2023-01-06 10:09:23 +08:00
|
|
|
// BaseResponse 基础返回结构
|
|
|
|
type BaseResponse struct {
|
2023-01-06 16:10:18 +08:00
|
|
|
Code int `json:"code"`
|
|
|
|
Message string `json:"message"`
|
|
|
|
Data interface{} `json:"result,omitempty"`
|
|
|
|
Status string `json:"type,omitempty"`
|
|
|
|
Err error `json:"error,omitempty"` // 错误堆栈
|
|
|
|
//Page int64 `json:"page,omitempty"` //当前页码
|
|
|
|
//PageSize int64 `json:"pageSize,omitempty"` // 单页显示记录数--前端参数2
|
|
|
|
//PageCount int64 `json:"totalPage,omitempty"` // 总页数
|
|
|
|
//TotalSize int64 `json:"total,omitempty"` // 总记录数
|
2023-01-06 10:09:23 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type UserLoginResponse struct {
|
|
|
|
UserId int64 `json:"userId"`
|
|
|
|
Token string `json:"token"`
|
|
|
|
RealName string `json:"realName"`
|
|
|
|
UserName string `json:"userName"`
|
|
|
|
Roles []RoleItem `json:"roles"`
|
|
|
|
Avatar string `json:"avatar"`
|
|
|
|
Desc string `json:"desc"`
|
|
|
|
HomePath string `json:"homePath"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type RoleItem struct {
|
|
|
|
RoleId int64 `json:"roleId"`
|
|
|
|
RoleName string `json:"roleName"`
|
|
|
|
Value string `json:"value"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type OwnerItem struct {
|
|
|
|
OwnerId int `json:"ownerId"`
|
|
|
|
OwnerName string `json:"ownerName"`
|
|
|
|
ChargeUser string `json:"chargeUser"`
|
|
|
|
Phone string `json:"phone"`
|
|
|
|
}
|
2023-01-12 10:21:40 +08:00
|
|
|
|
|
|
|
type UploadResponse struct {
|
|
|
|
Url string `json:"url"`
|
|
|
|
}
|
2023-01-13 11:26:39 +08:00
|
|
|
|
|
|
|
type OwnerProjectItem struct {
|
|
|
|
OwnerId int `json:"key"`
|
|
|
|
OwnerName string `json:"title"`
|
|
|
|
ProjectList []ProjectItem `json:"children"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type ProjectItem struct {
|
|
|
|
ProjectId string `json:"key"`
|
|
|
|
ProjectName string `json:"title"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type DatasetItem struct {
|
|
|
|
DatasetId int64 `json:"datasetId"`
|
|
|
|
DatasetName string `json:"datasetName"`
|
|
|
|
DatasetDesc string `json:"datasetDesc"`
|
2023-03-23 18:03:09 +08:00
|
|
|
StoreName string `json:"storeName"`
|
2023-01-13 11:26:39 +08:00
|
|
|
CategoryId int `json:"categoryId"`
|
|
|
|
ProjectId int64 `json:"projectId"`
|
|
|
|
OwnerId int64 `json:"ownerId"`
|
|
|
|
Creator int64 `json:"creator"`
|
|
|
|
CreateAt int64 `json:"createAt"`
|
|
|
|
DatasetCount int64 `json:"datasetCount"`
|
|
|
|
}
|
2023-03-23 18:03:09 +08:00
|
|
|
|
|
|
|
type NodeState struct {
|
|
|
|
List []model.NodeState `json:"list"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type NodeLastState struct {
|
|
|
|
List []NodeLastStateItem `json:"list"`
|
|
|
|
}
|
|
|
|
type NodeLastStateItem struct {
|
|
|
|
NodeId int64 `json:"nodeId"`
|
|
|
|
NodeGuid string `json:"nodeGuid"`
|
|
|
|
NodeName string `json:"nodeName"`
|
|
|
|
NodeType int `json:"nodeType"`
|
|
|
|
NodeStatus int `json:"nodeStatus"`
|
|
|
|
Platform string `json:"platform"`
|
|
|
|
PlatformVersion string `json:"platformVersion"`
|
|
|
|
CPU string `json:"CPU"`
|
|
|
|
MemTotal uint64 `json:"memTotal"`
|
|
|
|
DiskTotal uint64 `json:"diskTotal"`
|
|
|
|
SwapTotal uint64 `json:"swapTotal"`
|
|
|
|
CpuUsed float64 `json:"cpuUsed"`
|
|
|
|
MemUsed uint64 `json:"memUsed"`
|
|
|
|
SwapUsed uint64 `json:"swapUsed"`
|
|
|
|
DiskUsed uint64 `json:"diskUsed"`
|
|
|
|
NetInTransfer uint64 `json:"netInTransfer"`
|
|
|
|
NetOutTransfer uint64 `json:"netOutTransfer"`
|
|
|
|
NetInSpeed uint64 `json:"netInSpeed"`
|
|
|
|
NetOutSpeed uint64 `json:"netOutSpeed"`
|
|
|
|
Load1 float64 `json:"load1"`
|
|
|
|
Load5 float64 `json:"load5"`
|
|
|
|
Load15 float64 `json:"load15"`
|
|
|
|
TcpConnCount uint64 `json:"tcpConnCount"`
|
|
|
|
UdpConnCount uint64 `json:"udpConnCount"`
|
|
|
|
ProcessCount uint64 `json:"processCount"`
|
|
|
|
ExecTask string `json:"execTask"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type TaskDetail struct {
|
|
|
|
TaskId int64 `json:"taskId"`
|
|
|
|
ModelId int64 `json:"modelId"`
|
|
|
|
ModelName string `json:"modelName"`
|
|
|
|
NodeId int64 `json:"nodeId"`
|
|
|
|
NodeName string `json:"nodeName"`
|
|
|
|
TaskName string `json:"taskName"`
|
|
|
|
TaskDesc string `json:"taskDesc"`
|
|
|
|
DatasetArr string `json:"datasetArr"`
|
|
|
|
ResultStorage string `json:"resultStorage"`
|
|
|
|
AppointmentTime string `json:"appointmentTime"`
|
|
|
|
StartTime int64 `json:"startTime"`
|
|
|
|
FinishTime int64 `json:"finishTime"`
|
|
|
|
Status int `json:"status"`
|
|
|
|
CreateAt int64 `xorm:"created" json:"createAt"`
|
|
|
|
UpdateAt int64 `xorm:"updated" json:"updateAt"`
|
|
|
|
}
|