224 lines
8.0 KiB
Go
224 lines
8.0 KiB
Go
package model
|
|
|
|
type CreateModelParam struct {
|
|
UserName string `json:"username"`
|
|
RepoName string `json:"reponame"`
|
|
JobId string `json:"jobId"`
|
|
Name string `json:"name"`
|
|
Version string `json:"version"`
|
|
ModelSelectedFile string `json:"modelSelectedFile"`
|
|
}
|
|
|
|
type CreateModel struct {
|
|
Code string `json:"code"`
|
|
Msg string `json:"msg,omitempty"`
|
|
Id string `json:"id,omitempty"`
|
|
}
|
|
|
|
type GetByIdModelParam struct {
|
|
UserName string `json:"username"`
|
|
RepoName string `json:"reponame"`
|
|
Id string `json:"id"`
|
|
}
|
|
|
|
type QueryModelParam struct {
|
|
UserName string `json:"username"`
|
|
RepoName string `json:"reponame"`
|
|
}
|
|
|
|
type DownloadByIdParam struct {
|
|
UserName string `json:"username"`
|
|
RepoName string `json:"reponame"`
|
|
Id string `json:"id"`
|
|
}
|
|
|
|
type Model struct {
|
|
Id string `json:"id"`
|
|
Name string `json:"name"`
|
|
ModelType int `json:"modelType"`
|
|
Version string `json:"version"`
|
|
VersionCount int `json:"versionCount"`
|
|
New int `json:"new"`
|
|
Type int `json:"type"`
|
|
Size int `json:"size"`
|
|
Description string `json:"description"`
|
|
Label string `json:"label"`
|
|
Path string `json:"path"`
|
|
DownloadCount int `json:"downloadCount"`
|
|
Engine int `json:"engine"`
|
|
ComputeResource string `json:"computeResource"`
|
|
Status int `json:"status"`
|
|
StatusDesc string `json:"statusDesc"`
|
|
Accuracy string `json:"accuracy"`
|
|
AttachmentId string `json:"attachmentId"`
|
|
RepoId int `json:"repoId"`
|
|
CodeBranch string `json:"codeBranch"`
|
|
CodeCommitID string `json:"codeCommitID"`
|
|
Recommend int `json:"recommend"`
|
|
UserId int `json:"userId"`
|
|
IsPrivate bool `json:"isPrivate"`
|
|
UserName string `json:"userName"`
|
|
UserRelAvatarLink string `json:"userRelAvatarLink"`
|
|
TrainTaskInfo string `json:"trainTaskInfo"`
|
|
CreatedUnix int `json:"createdUnix"`
|
|
UpdatedUnix int `json:"updatedUnix"`
|
|
IsCanOper bool `json:"isCanOper"`
|
|
IsCanDelete bool `json:"isCanDelete"`
|
|
IsCanDownload bool `json:"isCanDownload"`
|
|
IsCollected bool `json:"isCollected"`
|
|
RepoName string `json:"repoName"`
|
|
RepoDisplayName string `json:"repoDisplayName"`
|
|
RepoOwnerName string `json:"repoOwnerName"`
|
|
DatasetInfo interface{} `json:"datasetInfo"`
|
|
ReferenceCount int `json:"referenceCount"`
|
|
CollectedCount int `json:"collectedCount"`
|
|
ModelFileList interface{} `json:"modelFileList"`
|
|
OnlineInfo interface{} `json:"onlineInfo"`
|
|
UsedCloudbrain interface{} `json:"usedCloudbrain"`
|
|
HasOnlineUrl int `json:"hasOnlineUrl"`
|
|
License string `json:"license"`
|
|
}
|
|
|
|
type CreateLocalModelParam struct {
|
|
UserName string `json:"username"`
|
|
RepoName string `json:"reponame"`
|
|
FormData string `json:"formdata,omitempty"`
|
|
Name string `json:"name"`
|
|
Version string `json:"version"`
|
|
Engine int `json:"engine"`
|
|
Label string `json:"label,omitempty"`
|
|
IsPrivate bool `json:"isPrivate,omitempty"`
|
|
Description string `json:"description,omitempty"`
|
|
Type int `json:"type"`
|
|
License string `json:"license"`
|
|
}
|
|
|
|
type CreateLocalModel struct {
|
|
Code string `json:"code"`
|
|
Msg string `json:"msg,omitempty"`
|
|
Id string `json:"id,omitempty"`
|
|
}
|
|
|
|
type GetUploadedChunksParam struct {
|
|
UserName string `json:"username"`
|
|
RepoName string `json:"reponame"`
|
|
Md5 string `json:"md5"`
|
|
FileName string `json:"file_name"`
|
|
Type int `json:"type"`
|
|
Modeluuid string `json:"modeluuid"`
|
|
}
|
|
|
|
type GetUploadedChunks struct {
|
|
Chunks string `json:"chunks"`
|
|
UploadID string `json:"uploadID"`
|
|
Uploaded string `json:"uploaded"`
|
|
Uuid string `json:"uuid"`
|
|
AttachID string `json:"attachID,omitempty"`
|
|
Modeluuid string `json:"modeluuid,omitempty"`
|
|
FileName string `json:"fileName,omitempty"`
|
|
ModelName string `json:"modelName,omitempty"`
|
|
}
|
|
|
|
type NewMultipartParam struct {
|
|
UserName string `json:"username"`
|
|
RepoName string `json:"reponame"`
|
|
TotalChunkCounts int `json:"totalChunkCounts"`
|
|
Type int `json:"type"`
|
|
Size int `json:"size"`
|
|
Md5 string `json:"md5"`
|
|
File_name string `json:"file_name"`
|
|
Modeluuid string `json:"modeluuid"`
|
|
}
|
|
|
|
type NewMultipart struct {
|
|
Code string `json:"result_code"`
|
|
Msg string `json:"msg,omitempty"`
|
|
UploadID string `json:"uploadID,omitempty"`
|
|
Uuid string `json:"uuid,omitempty"`
|
|
}
|
|
|
|
type GetMultipartUrlParam struct {
|
|
UserName string `json:"username"`
|
|
RepoName string `json:"reponame"`
|
|
Uuid string `json:"uuid"`
|
|
UploadID string `json:"uploadID"`
|
|
Type int `json:"type"`
|
|
Size int `json:"size"`
|
|
ChunkNumber int `json:"chunkNumber"`
|
|
FileName string `json:"file_name"`
|
|
Modeluuid string `json:"modeluuid"`
|
|
}
|
|
|
|
type GetMultipartUrl struct {
|
|
Url string `json:"url"`
|
|
}
|
|
|
|
type CompleteMultipartParam struct {
|
|
UserName string `json:"username"`
|
|
RepoName string `json:"reponame"`
|
|
Uuid string `json:"uuid"`
|
|
UploadID string `json:"uploadID"`
|
|
Modeluuid string `json:"modeluuid"`
|
|
Type int `json:"type"`
|
|
}
|
|
|
|
type CompleteMultipart struct {
|
|
Code string `json:"result_code"`
|
|
}
|
|
|
|
type ListModelResp struct {
|
|
Count int `json:"count"`
|
|
Data []struct {
|
|
Id string `json:"id"`
|
|
Name string `json:"name"`
|
|
ModelType int `json:"modelType"`
|
|
Version string `json:"version"`
|
|
VersionCount int `json:"versionCount"`
|
|
New int `json:"new"`
|
|
Type int `json:"type"`
|
|
Size int `json:"size"`
|
|
Description string `json:"description"`
|
|
Label string `json:"label"`
|
|
Path string `json:"path"`
|
|
DownloadCount int `json:"downloadCount"`
|
|
Engine int `json:"engine"`
|
|
ComputeResource string `json:"computeResource"`
|
|
Status int `json:"status"`
|
|
StatusDesc string `json:"statusDesc"`
|
|
Accuracy string `json:"accuracy"`
|
|
AttachmentId string `json:"attachmentId"`
|
|
RepoId int `json:"repoId"`
|
|
CodeBranch string `json:"codeBranch"`
|
|
CodeCommitID string `json:"codeCommitID"`
|
|
Recommend int `json:"recommend"`
|
|
UserId int `json:"userId"`
|
|
IsPrivate bool `json:"isPrivate"`
|
|
UserName string `json:"userName"`
|
|
UserRelAvatarLink string `json:"userRelAvatarLink"`
|
|
TrainTaskInfo string `json:"trainTaskInfo"`
|
|
CreatedUnix int `json:"createdUnix"`
|
|
UpdatedUnix int `json:"updatedUnix"`
|
|
IsCanOper bool `json:"isCanOper"`
|
|
IsCanDelete bool `json:"isCanDelete"`
|
|
IsCanDownload bool `json:"isCanDownload"`
|
|
IsCollected bool `json:"isCollected"`
|
|
RepoName string `json:"repoName"`
|
|
RepoDisplayName string `json:"repoDisplayName"`
|
|
RepoOwnerName string `json:"repoOwnerName"`
|
|
DatasetInfo interface{} `json:"datasetInfo"`
|
|
ReferenceCount int `json:"referenceCount"`
|
|
CollectedCount int `json:"collectedCount"`
|
|
ModelFileList interface{} `json:"modelFileList"`
|
|
OnlineInfo interface{} `json:"onlineInfo"`
|
|
UsedCloudbrain interface{} `json:"usedCloudbrain"`
|
|
HasOnlineUrl int `json:"hasOnlineUrl"`
|
|
License string `json:"license"`
|
|
} `json:"data"`
|
|
}
|
|
|
|
type ModelUploadFileParam struct {
|
|
UserName string `json:"username" form:"username" binding:"required"`
|
|
RepoName string `json:"repoName" form:"repoName" binding:"required"`
|
|
ModelUuid string `json:"modelUuid" form:"modelUuid" binding:"required"`
|
|
}
|