数据集查询列表

This commit is contained in:
lee 2023-02-27 11:33:25 +08:00
parent c0f2f2d80b
commit 8cf020a444
2 changed files with 16 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import (
"io/ioutil"
"log"
"net/http"
"strconv"
"strings"
"time"
)
@ -32,11 +33,13 @@ func (l *ListJobLogic) ListJob(in *modelarts.ListImportTasks) (*modelarts.Return
// todo: add your logic here and delete this line
datasetId := in.DatasetId
projectId := in.ProjectId
limit := strconv.Itoa(int(in.Limit))
offset := strconv.Itoa(int(in.Offset))
//projectId = "49b15000ba2a4658afb583fb987b0961"
//datasetId = "aXZm3lRfM1hzJ48B2yR"
var resp modelarts.ReturnListImportTasks
c := http.Client{Timeout: time.Duration(3) * time.Second}
reqUrl, err := http.NewRequest("GET", "https://modelarts.cn-north-4.myhuaweicloud.com/v2/"+projectId+"/datasets/"+datasetId+"/import-tasks", strings.NewReader(``))
reqUrl, err := http.NewRequest("GET", "https://modelarts.cn-north-4.myhuaweicloud.com/v2/"+projectId+"/datasets/"+datasetId+"/import-tasks?"+limit+"&"+offset, strings.NewReader(``))
if err != nil {
log.Fatal(err)
}

View File

@ -81,6 +81,8 @@ message dataSources{
message ListImportTasks{
string dataset_id = 1; // @gotags: copier:"Dataset_id"
string project_id = 2; // @gotags: copier:"Project_id"
int32 limit = 3; // @gotags: copier:"Limit"
int32 offset = 4; // @gotags: copier:"Offset"
}
@ -114,6 +116,10 @@ message Import_tasks{
uint32 update_ms = 22;
Data_source data_source = 23;
File_statistics file_statistics = 24;
repeated Annotation_format_config annotation_format_config = 25;
}
message Annotation_format_config{
}
message Data_source{
@ -153,6 +159,12 @@ message File_statistics{
}
/******************Job End*************************/
/******************Job Start*************************/
//
/******************Job End*************************/
// Slurm Services for Shuguang Branch