| @@ -227,6 +227,99 @@ type ResourceRange struct { | |||
| Ids []string `json:"ids"` | |||
| } | |||
| type PCMJobData struct { | |||
| ID string `json:"id"` | |||
| CreatedAt time.Time `json:"created_at"` | |||
| Param string `json:"param"` | |||
| } | |||
| type JobInfo struct { | |||
| Name string `json:"name"` | |||
| Description string `json:"description,optional"` | |||
| JobResources JobResources `json:"jobResources"` | |||
| DataDistributeData DataDistributeData `json:"dataDistributes"` | |||
| ResultFile ResultFile `json:"resultFile"` | |||
| } | |||
| type ResultFile struct { | |||
| Path string `json:"path"` | |||
| UpdateTime string `json:"updateTime"` | |||
| Size int `json:"size"` | |||
| } | |||
| type DataDistributeData struct { | |||
| Dataset []DataItem `json:"dataset"` | |||
| Code []DataItem `json:"code"` | |||
| Image []DataItem `json:"image"` | |||
| Model []DataItem `json:"model"` | |||
| } | |||
| // DataItem 定义 dataDistributes 中的数据项结构体 | |||
| type DataItem struct { | |||
| DataName string `json:"dataName"` | |||
| PackageID int `json:"packageID"` | |||
| PackageName string `json:"packageName"` | |||
| ResourceFile string `json:"resourceFile"` | |||
| Clusters []DataDetail `json:"clusters"` | |||
| } | |||
| type JobResources struct { | |||
| ScheduleStrategy string `json:"scheduleStrategy"` | |||
| Clusters []*JobClusterInfo `json:"clusters"` | |||
| } | |||
| type JobClusterInfo struct { | |||
| ClusterID string `json:"clusterID"` | |||
| Resources []map[string]interface{} `json:"resources,optional"` | |||
| Runtime JobRuntimeInfo `json:"runtime,optional"` | |||
| } | |||
| type JobRuntimeInfo struct { | |||
| Command string `json:"command,optional"` | |||
| Envs map[string]interface{} `json:"envs,optional"` | |||
| Params map[string]interface{} `json:"params,optional"` | |||
| } | |||
| // Engine 定义 engine 结构体 | |||
| type Engine struct { | |||
| EngineName string `json:"EngineName"` | |||
| EngineVersion string `json:"EngineVersion"` | |||
| ImageUrl string `json:"ImageUrl"` | |||
| InstallSysPackages bool `json:"InstallSysPackages"` | |||
| } | |||
| // bindingCluster 定义根结构体 | |||
| type BindingParam struct { | |||
| Name string `json:"name"` | |||
| Description string `json:"description"` | |||
| Engine Engine `json:"engine"` | |||
| CodeDir string `json:"codeDir"` | |||
| BootFile string `json:"bootFile"` | |||
| Branch string `json:"branch"` | |||
| Platform string `json:"platform"` | |||
| UserID int `json:"userID"` | |||
| PackageId int `json:"packageId"` | |||
| BucketID int `json:"bucketID"` | |||
| } | |||
| // bindingCluster 定义根结构体 | |||
| type BindingCluster struct { | |||
| BindingId int `json:"binding_id"` | |||
| ClusterId string `json:"cluster_id"` | |||
| Status string `json:"status"` | |||
| Param string `json:"param"` | |||
| } | |||
| /*type TaskResult struct { | |||
| Name string `json:"name"` | |||
| Description string `json:"description"` | |||
| DataDistribute DataDistribute `json:"dataDistributes"` | |||
| } | |||
| type ClusterResources struct { | |||
| ClusterId string `json:"clusterId"` | |||
| }*/ | |||
| type Range struct { | |||
| Min float64 `json:"min"` | |||
| Max float64 `json:"max"` | |||