154 lines
5.1 KiB
Go
154 lines
5.1 KiB
Go
package model
|
||
|
||
type DatasetParam struct {
|
||
UserName string `json:"username" form:"username"`
|
||
RepoName string `json:"reponame" form:"reponame"`
|
||
Type int `json:"type" form:"type"` //type=0 GPU环境可用数据集;type=1 NPU环境可用数据集。
|
||
Q string `json:"q,omitempty" form:"q"`
|
||
Page int `json:"page" form:"page"`
|
||
PageSize int `json:"pageSize" form:"pageSize"`
|
||
}
|
||
|
||
type Dataset struct {
|
||
Code int `json:"code"`
|
||
Count int `json:"count"`
|
||
Data []struct {
|
||
Id int `json:"id"`
|
||
Title string `json:"title"`
|
||
Status int `json:"status"`
|
||
Category string `json:"category"`
|
||
Description string `json:"description"`
|
||
DownloadTimes int `json:"downloadTimes"`
|
||
UseCount int `json:"useCount"`
|
||
NumStars int `json:"numStars"`
|
||
Recommend bool `json:"recommend"`
|
||
License string `json:"license"`
|
||
Task string `json:"task"`
|
||
ReleaseId int `json:"releaseId"`
|
||
UserId int `json:"userId"`
|
||
RepoId int `json:"repoId"`
|
||
Repo struct {
|
||
OwnerName string `json:"ownerName"`
|
||
Name string `json:"name"`
|
||
} `json:"repo"`
|
||
CreatedUnix int `json:"createdUnix"`
|
||
UpdatedUnix int `json:"updatedUnix"`
|
||
Attachments []struct {
|
||
Id int `json:"id"`
|
||
Uuid string `json:"uuid"`
|
||
DatasetId int `json:"datasetId"`
|
||
ReleaseId int `json:"releaseId"`
|
||
UploaderId int `json:"uploaderId"`
|
||
CommentId int `json:"commentId"`
|
||
Name string `json:"name"`
|
||
Description string `json:"description"`
|
||
DownloadCount int `json:"downloadCount"`
|
||
UseNumber int `json:"useNumber"`
|
||
Size int64 `json:"size"`
|
||
IsPrivate bool `json:"isPrivate"`
|
||
DecompressState int `json:"decompressState"`
|
||
Type int `json:"type"`
|
||
CreatedUnix int `json:"createdUnix"`
|
||
} `json:"attachments"`
|
||
} `json:"data"`
|
||
Message string `json:"message"`
|
||
}
|
||
|
||
type ExportDatasetParam struct {
|
||
UserName string `json:"username"`
|
||
RepoName string `json:"reponame"`
|
||
JobId string `json:"jobId"`
|
||
ModelSelectedFile string `json:"modelSelectedFile"` //文件名称,为查询接口返回的文件名,多个文件用英文的分号;分隔。
|
||
DatasetId string `json:"datasetId"` //需要上传选择文件的数据集ID
|
||
Type int `json:"type,omitempty"` //数据集存储的集群,0为GPU,1为NPU
|
||
}
|
||
|
||
type ExportDataset struct {
|
||
Code string `json:"code"`
|
||
ProgressId string `json:"progressId,omitempty"`
|
||
Msg string `json:"msg,omitempty"`
|
||
}
|
||
|
||
type CreateDatasetParam struct {
|
||
UserName string `json:"username"`
|
||
RepoName string `json:"reponame"`
|
||
Title string `json:"title"`
|
||
Category string `json:"category"`
|
||
Task string `json:"task"`
|
||
Description string `json:"description"`
|
||
}
|
||
|
||
type CreateDataset struct {
|
||
Code int `json:"Code"`
|
||
Message string `json:"Message"`
|
||
DatasetId int `json:"DatasetId"`
|
||
}
|
||
|
||
type DatasetUploadFileParam struct {
|
||
UserName string `json:"username" form:"username" binding:"required"`
|
||
RepoName string `json:"repoName" form:"repoName" binding:"required"`
|
||
DatasetId string `json:"datasetId" form:"datasetId" binding:"required"`
|
||
CustomName string `json:"customName" form:"customName" binding:"required"` //自定义名称
|
||
}
|
||
|
||
type GetChunksResp struct {
|
||
AttachID string `json:"attachID"`
|
||
Chunks string `json:"chunks"`
|
||
DatasetID string `json:"datasetID"`
|
||
DatasetName string `json:"datasetName"`
|
||
ModelName string `json:"modelName"`
|
||
Modeluuid string `json:"modeluuid"`
|
||
FileName string `json:"fileName"`
|
||
UploadID string `json:"uploadID"`
|
||
Uploaded string `json:"uploaded"`
|
||
Uuid string `json:"uuid"`
|
||
}
|
||
|
||
type NewMultipartResp struct {
|
||
ResultCode string `json:"result_code"`
|
||
UploadID string `json:"uploadID"`
|
||
Uuid string `json:"uuid"`
|
||
}
|
||
type GetMultipartUrlResp struct {
|
||
Url string `json:"url"`
|
||
}
|
||
|
||
type CompleteMultipartResp struct {
|
||
Msg string `json:"msg"`
|
||
ResultCode string `json:"result_code"`
|
||
}
|
||
|
||
type ListDatasetsResp struct {
|
||
Code int `json:"code"`
|
||
Data []struct {
|
||
Id int `json:"id"`
|
||
Title string `json:"title"`
|
||
Status int `json:"status"`
|
||
Category string `json:"category"`
|
||
Description string `json:"description"`
|
||
DownloadTimes int `json:"downloadTimes"`
|
||
UseCount int `json:"useCount"`
|
||
NumStars int `json:"numStars"`
|
||
Recommend bool `json:"recommend"`
|
||
License string `json:"license"`
|
||
Task string `json:"task"`
|
||
ReleaseId int `json:"releaseId"`
|
||
UserId int `json:"userId"`
|
||
RepoId int `json:"repoId"`
|
||
Repo struct {
|
||
OwnerName string `json:"ownerName"`
|
||
Name string `json:"name"`
|
||
} `json:"repo"`
|
||
CreatedUnix int `json:"createdUnix"`
|
||
UpdatedUnix int `json:"updatedUnix"`
|
||
Attachments interface{} `json:"attachments"`
|
||
} `json:"data"`
|
||
Message string `json:"message"`
|
||
}
|
||
|
||
type Err struct {
|
||
DocumentationUrl string `json:"documentation_url"`
|
||
Errors interface{} `json:"errors"`
|
||
Message string `json:"message"`
|
||
}
|