2023-01-06 10:09:23 +08:00
|
|
|
package proto
|
|
|
|
|
2023-01-11 18:05:29 +08:00
|
|
|
import (
|
|
|
|
"encoding/json"
|
|
|
|
"mime/multipart"
|
|
|
|
)
|
2023-01-06 10:09:23 +08:00
|
|
|
|
|
|
|
type BasePageList struct {
|
|
|
|
Page int64 `json:"pageNum,omitempty" form:"page"`
|
|
|
|
Size int64 `json:"pageSize,omitempty" form:"pageSize"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type UserLogin struct {
|
|
|
|
UserName string `json:"username"`
|
|
|
|
UserPass string `json:"password"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (us UserLogin) ToString() string {
|
|
|
|
data, err := json.Marshal(us)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
2023-03-23 18:03:09 +08:00
|
|
|
type UserRequest struct {
|
|
|
|
RealName string `json:"realName"`
|
|
|
|
Phone string `json:"phone"`
|
|
|
|
BasePageList
|
|
|
|
}
|
|
|
|
|
|
|
|
func (us UserRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(us)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
2023-01-06 10:09:23 +08:00
|
|
|
type OwnerRequest struct {
|
|
|
|
OwnerName string `json:"ownerName"`
|
|
|
|
BasePageList
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r OwnerRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(r)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type OwnerItemReq struct {
|
|
|
|
OwnerId int64 `json:"ownerId"`
|
|
|
|
OwnerName string `json:"ownerName"`
|
|
|
|
ChargeUser string `json:"chargeUser"`
|
|
|
|
Phone string `json:"phone"`
|
|
|
|
Creator int64 `json:"creator"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r OwnerItemReq) ToString() string {
|
|
|
|
data, err := json.Marshal(r)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type ProjectRequest struct {
|
|
|
|
LineName string `json:"lineName"`
|
|
|
|
ProjectName string `json:"projectName"`
|
2023-01-10 10:01:42 +08:00
|
|
|
OwnerId int64 `json:"ownerId,omitempty"`
|
2023-01-06 10:09:23 +08:00
|
|
|
BasePageList
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p ProjectRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type ProjectItemRequest struct {
|
2023-01-13 11:26:39 +08:00
|
|
|
ProjectId int64 `json:"projectId"`
|
|
|
|
ProjectName string `json:"projectName"`
|
|
|
|
OwnerId int64 `json:"ownerId"`
|
|
|
|
LineName string `json:"lineName"`
|
|
|
|
StartName string `json:"startName"`
|
|
|
|
EndName string `json:"endName"`
|
|
|
|
FixedDeviceNum int `json:"fixedDeviceNum"`
|
|
|
|
Direction string `json:"direction"`
|
|
|
|
LaneNum int `json:"laneNum"`
|
|
|
|
Creator int64 `json:"creator"`
|
2023-01-06 10:09:23 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (p ProjectItemRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type ProductRequest struct {
|
|
|
|
CategoryId int64 `json:"categoryId"`
|
|
|
|
ProductName string `json:"productName"`
|
|
|
|
Protocol int64 `json:"protocol"`
|
|
|
|
BasePageList
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p ProductRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type ProductItemRequest struct {
|
|
|
|
MatterId int64 `json:"matterId"`
|
|
|
|
MatterName string `json:"matterName"`
|
|
|
|
CategoryId int64 `json:"categoryId"`
|
|
|
|
Protocol int `json:"protocol"`
|
2023-01-10 10:01:42 +08:00
|
|
|
Connection int `json:"connection"`
|
|
|
|
ModelDesc string `json:"modelDesc"`
|
2023-01-06 10:09:23 +08:00
|
|
|
UserVersion int64 `json:"userVersion"`
|
|
|
|
Status int `json:"status"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p ProductItemRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type ProductCategoryRequest struct {
|
|
|
|
CategoryName string `json:"categoryName"`
|
|
|
|
BasePageList
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p ProductCategoryRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type ProductCategoryItemRequest struct {
|
|
|
|
CategoryId int64 `json:"categoryId"`
|
|
|
|
CategoryName string `json:"categoryName"`
|
|
|
|
CategoryDesc string `json:"categoryDesc"`
|
|
|
|
Status int `json:"status"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p ProductCategoryItemRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type AttributeRequest struct {
|
|
|
|
MatterId int64 `json:"matterId"`
|
|
|
|
VersionId int64 `json:"versionId"`
|
|
|
|
BasePageList
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p AttributeRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type AttributeItemRequest struct {
|
|
|
|
AttributeId int64 `json:"attributeId"`
|
|
|
|
MatterId int64 `json:"matterId"`
|
|
|
|
VersionId int64 `json:"versionId"`
|
|
|
|
AttributeName string `json:"attributeName"`
|
|
|
|
AttributeKey string `json:"attributeKey"`
|
|
|
|
AttributeDesc string `json:"attributeDesc"`
|
|
|
|
DataType int `json:"dataType"`
|
|
|
|
MaxValue string `json:"maxValue"`
|
|
|
|
MinValue string `json:"minValue"`
|
|
|
|
StepValue string `json:"stepValue"`
|
|
|
|
Unit string `json:"unit"`
|
|
|
|
IsOnlyRead int `json:"isOnlyRead"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p AttributeItemRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type EventItemRequest struct {
|
|
|
|
EventId int64 `json:"eventId"`
|
|
|
|
MatterId int64 `json:"matterId"`
|
|
|
|
VersionId int64 `json:"versionId"`
|
|
|
|
EventIdentifier string `json:"eventIdentifier"`
|
|
|
|
EventType string `json:"eventType"`
|
|
|
|
EventDesc string `json:"eventDesc"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p EventItemRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type ServiceItemRequest struct {
|
|
|
|
ServiceId int64 `json:"serviceId"`
|
|
|
|
MatterId int64 `json:"matterId"`
|
|
|
|
VersionId int64 `json:"versionId"`
|
|
|
|
ServiceName string `json:"serviceName"`
|
|
|
|
ServiceIdentifier string `json:"serviceIdentifier"`
|
|
|
|
Calling int `json:"calling"`
|
|
|
|
ServiceDesc string `json:"serviceDesc"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p ServiceItemRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
2023-01-06 14:38:22 +08:00
|
|
|
|
|
|
|
type EventParamsRequest struct {
|
|
|
|
EventId int64 `json:"eventId"`
|
|
|
|
MatterId int64 `json:"matterId"`
|
|
|
|
VersionId int64 `json:"versionId"`
|
|
|
|
BasePageList
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p EventParamsRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type EventParamItem struct {
|
|
|
|
ParamsId int64 `json:"paramsId"`
|
|
|
|
MatterId int64 `json:"matterId"`
|
|
|
|
VersionId int64 `json:"versionId"`
|
|
|
|
EventId int64 `json:"eventId"`
|
|
|
|
ParamName string `json:"paramName"`
|
|
|
|
ParamIdentifier string `json:"paramIdentifier"`
|
2023-01-10 10:01:42 +08:00
|
|
|
ParamDesc string `json:"paramDesc"`
|
2023-01-06 14:38:22 +08:00
|
|
|
DataType int `json:"dataType"`
|
|
|
|
MaxValue string `json:"maxValue"`
|
|
|
|
MinValue string `json:"minValue"`
|
|
|
|
StepValue string `json:"stepValue"`
|
|
|
|
Unit string `json:"unit"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p EventParamItem) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type ServiceParamsRequest struct {
|
|
|
|
MatterId int64 `json:"matterId"`
|
|
|
|
VersionId int64 `json:"versionId"`
|
|
|
|
ServiceId int64 `json:"serviceId"`
|
|
|
|
ParamsOwnerType int `json:"paramsOwnerType"`
|
|
|
|
BasePageList
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p ServiceParamsRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type ServiceParamItem struct {
|
|
|
|
ParamsId int64 `json:"paramsId"`
|
|
|
|
MatterId int64 `json:"matterId"`
|
|
|
|
VersionId int64 `json:"versionId"`
|
|
|
|
ServiceId int64 `json:"serviceId"`
|
|
|
|
ParamsOwnerType int `json:"paramsOwnerType"`
|
|
|
|
ParamName string `json:"paramName"`
|
|
|
|
ParamIdentifier string `json:"paramIdentifier"`
|
2023-01-10 10:01:42 +08:00
|
|
|
ParamDesc string `json:"paramDesc"`
|
2023-01-06 14:38:22 +08:00
|
|
|
DataType int `json:"dataType"`
|
|
|
|
MaxValue string `json:"maxValue"`
|
|
|
|
MinValue string `json:"minValue"`
|
|
|
|
StepValue string `json:"stepValue"`
|
|
|
|
Unit string `json:"unit"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p ServiceParamItem) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type ModelRequest struct {
|
2023-03-23 18:03:09 +08:00
|
|
|
ModelName string `json:"modelName,omitempty"`
|
|
|
|
BizType int `json:"bizType,omitempty"`
|
2023-01-06 14:38:22 +08:00
|
|
|
BasePageList
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p ModelRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type ModelItemRequest struct {
|
2023-03-23 18:03:09 +08:00
|
|
|
ModelId int64 `json:"modelId"`
|
|
|
|
BizType int `json:"bizType"`
|
|
|
|
ModelName string `json:"modelName"`
|
|
|
|
ModelVersion string `json:"modelVersion"`
|
|
|
|
ModelDesc string `json:"modelDesc"`
|
|
|
|
ModelFiles string `json:"modelFiles"`
|
|
|
|
ModelParamsFiles string `json:"modelParamsFiles"`
|
|
|
|
ModelExecScript string `json:"modelExecScript"`
|
|
|
|
DockerFile []string `json:"dockerFile"`
|
|
|
|
MappedPort int `json:"mappedPort"`
|
|
|
|
ModelCommand string `json:"modelCommand"`
|
|
|
|
InPath string `json:"inPath"`
|
|
|
|
OutPath string `json:"outPath"`
|
|
|
|
HttpUrl string `json:"httpUrl"`
|
|
|
|
IsLightWeight bool `json:"isLightWeight"`
|
|
|
|
Workflow string `json:"workflow"`
|
2023-01-06 14:38:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (p ModelItemRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
2023-01-11 18:05:29 +08:00
|
|
|
|
2023-03-23 18:03:09 +08:00
|
|
|
type ModelIssueRequest struct {
|
|
|
|
NodeId int64 `json:"nodeId"`
|
|
|
|
ModelId int64 `json:"modelId"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p ModelIssueRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
2023-01-11 18:05:29 +08:00
|
|
|
type DeviceRequest struct {
|
|
|
|
Key string `json:"key"`
|
|
|
|
ProductId int64 `json:"productId"`
|
|
|
|
DeviceTypeId int `json:"deviceTypeId"`
|
|
|
|
BasePageList
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p DeviceRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type DeviceItemRequest struct {
|
|
|
|
DeviceId int64 `json:"deviceId"`
|
|
|
|
DeviceName string `json:"deviceName"`
|
|
|
|
DeviceBrandId int `json:"deviceBrandId"`
|
|
|
|
DeviceImei string `json:"deviceImei"`
|
|
|
|
DeviceSn string `json:"deviceSn"`
|
|
|
|
DeviceTypeId int `json:"deviceTypeId"`
|
|
|
|
ButtMatterId int64 `json:"buttMatterId"`
|
|
|
|
ButtType int `json:"buttType"`
|
|
|
|
ButtAddress string `json:"buttAddress"`
|
|
|
|
ButtPort int `json:"buttPort"`
|
|
|
|
Longitude float64 `json:"longitude"`
|
|
|
|
Latitude float64 `json:"latitude"`
|
|
|
|
DeviceDesc string `json:"deviceDesc"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p DeviceItemRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type UploadFileRequest struct {
|
2023-03-24 08:42:28 +08:00
|
|
|
Creator int64 `json:"creator"`
|
|
|
|
Scene string `json:"scene"`
|
|
|
|
Files []*multipart.FileHeader `json:"files"`
|
|
|
|
DatasetId int64 `json:"datasetId"`
|
2023-01-11 18:05:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type BrandRequest struct {
|
|
|
|
BrandName string `json:"brandName"`
|
|
|
|
BasePageList
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p BrandRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type BrandItemRequest struct {
|
|
|
|
BrandId int64 `json:"brandId"`
|
|
|
|
BrandName string `json:"brandName"`
|
|
|
|
BrandLogo string `json:"brandLogo"`
|
|
|
|
BrandWeb string `json:"brandWeb"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p BrandItemRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
2023-01-12 10:21:40 +08:00
|
|
|
|
2023-03-23 18:03:09 +08:00
|
|
|
type DiseaseRequest struct {
|
|
|
|
BizType int `json:"bizType"`
|
|
|
|
Key string `json:"key"`
|
|
|
|
BasePageList
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p DiseaseRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
2023-01-12 10:21:40 +08:00
|
|
|
type DiseaseTypeRequest struct {
|
|
|
|
CategoryId int `json:"categoryId"`
|
|
|
|
Key string `json:"key"`
|
|
|
|
BasePageList
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p DiseaseTypeRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type DiseaseTypeItemRequest struct {
|
|
|
|
TypeId int64 `json:"typeId"`
|
|
|
|
TypeName string `json:"typeName"`
|
|
|
|
CategoryId int `json:"categoryId"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p DiseaseTypeItemRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
2023-01-13 11:26:39 +08:00
|
|
|
|
|
|
|
type OwnerProjectRequest struct {
|
|
|
|
Key string `json:"key"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p OwnerProjectRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type DatasetRequest struct {
|
|
|
|
OwnerId int64 `json:"ownerId"`
|
|
|
|
ProjectId int64 `json:"projectId"`
|
|
|
|
DatasetName string `json:"datasetName"`
|
|
|
|
StartTime string `json:"startTime"`
|
|
|
|
EndTime string `json:"endTime"`
|
|
|
|
BasePageList
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p DatasetRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type ImportDatasetRequest struct {
|
|
|
|
DatasetId int64 `json:"datasetId"`
|
|
|
|
CategoryId int `json:"categoryId"`
|
|
|
|
DatasetName string `json:"datasetName"`
|
|
|
|
DatasetDesc string `json:"datasetDesc"`
|
|
|
|
ProjectId int64 `json:"projectId"`
|
2023-03-23 18:03:09 +08:00
|
|
|
StoreName string `json:"storeName"`
|
2023-01-13 11:26:39 +08:00
|
|
|
OwnerId int64 `json:"ownerId"`
|
|
|
|
Creator int64 `json:"creator"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p ImportDatasetRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
2023-03-23 18:03:09 +08:00
|
|
|
|
|
|
|
type NodeRequest struct {
|
|
|
|
NodeId int64 `json:"nodeId"`
|
|
|
|
NodeName string `json:"nodeName"`
|
|
|
|
NodeGuid string `json:"nodeGuid"`
|
|
|
|
NodeType int `json:"nodeType"`
|
|
|
|
Platform string `json:"platform"`
|
|
|
|
PlatformVersion string `json:"platformVersion"`
|
|
|
|
CPU string `json:"cpu"`
|
|
|
|
MemTotal uint64 `json:"memTotal"`
|
|
|
|
DiskTotal uint64 `json:"diskTotal"`
|
|
|
|
SwapTotal uint64 `json:"swapTotal"`
|
|
|
|
Arch string `json:"arch"`
|
|
|
|
Virtualization string `json:"virtualization"`
|
|
|
|
BootTime uint64 `json:"bootTime"`
|
|
|
|
IP string `json:"ip"`
|
|
|
|
CountryCode string `json:"countryCode"`
|
|
|
|
Version string `json:"version"`
|
|
|
|
CreateAt int64 `json:"createAt"`
|
|
|
|
UpdateAt int64 `json:"updateAt"`
|
|
|
|
BasePageList
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p NodeRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type NodeItemRequest struct {
|
|
|
|
NodeId int64 `json:"nodeId"`
|
|
|
|
NodeName string `json:"nodeName"`
|
|
|
|
NodeGuid string `json:"nodeGuid"`
|
|
|
|
NodeType int `json:"nodeType"`
|
|
|
|
Platform string `json:"platform"`
|
|
|
|
PlatformVersion string `json:"platformVersion"`
|
|
|
|
CPU string `json:"cpu"`
|
|
|
|
MemTotal uint64 `json:"memTotal"`
|
|
|
|
DiskTotal uint64 `json:"diskTotal"`
|
|
|
|
SwapTotal uint64 `json:"swapTotal"`
|
|
|
|
Arch string `json:"arch"`
|
|
|
|
Virtualization string `json:"virtualization"`
|
|
|
|
BootTime uint64 `json:"bootTime"`
|
|
|
|
IP string `json:"ip"`
|
|
|
|
CountryCode string `json:"countryCode"`
|
|
|
|
Version string `json:"version"`
|
|
|
|
CreateAt int64 `json:"createAt"`
|
|
|
|
UpdateAt int64 `json:"updateAt"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p NodeItemRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type NodeInfoRequest struct {
|
|
|
|
NodeGuid string `json:"nodeGuid"`
|
|
|
|
Uptime int64 `json:"uptime"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p NodeInfoRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type TaskRequest struct {
|
|
|
|
BizType int `json:"bizType"`
|
|
|
|
TaskName string `json:"taskName"`
|
|
|
|
StartTime string `json:"startTime"`
|
|
|
|
FinishTime string `json:"finishTime"`
|
|
|
|
BasePageList
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p TaskRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
type TaskItemRequest struct {
|
|
|
|
TaskId int64 `json:"taskId"`
|
|
|
|
ModelId int64 `json:"modelId"`
|
|
|
|
NodeId int64 `json:"nodeId"`
|
|
|
|
TaskName string `json:"taskName"`
|
|
|
|
TaskDesc string `json:"taskDesc"`
|
|
|
|
DatasetArr int64 `json:"datasetArr"`
|
|
|
|
SubDataset string `json:"subDataset"`
|
|
|
|
SubDataTag int `json:"subDataTag"`
|
|
|
|
AppointmentTime string `json:"appointmentTime"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p TaskItemRequest) ToString() string {
|
|
|
|
data, err := json.Marshal(p)
|
|
|
|
if err != nil {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return string(data)
|
|
|
|
}
|