|
package homecloud |
|
|
|
const ( |
|
MetaPersonal string = "personal" |
|
MetaFamily string = "family" |
|
MetaPersonalNew string = "personal_new" |
|
) |
|
|
|
type BaseResp struct { |
|
Success bool `json:"success"` |
|
Code string `json:"code"` |
|
Message string `json:"message"` |
|
} |
|
|
|
type FrontResp struct { |
|
Ret int `json:"ret"` |
|
Reason string `json:"reason"` |
|
} |
|
|
|
type Catalog struct { |
|
CatalogID string `json:"catalogID"` |
|
CatalogName string `json:"catalogName"` |
|
|
|
CreateTime string `json:"createTime"` |
|
UpdateTime string `json:"updateTime"` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
type Content struct { |
|
ContentID string `json:"contentID"` |
|
ContentName string `json:"contentName"` |
|
|
|
ContentSize int64 `json:"contentSize"` |
|
|
|
|
|
|
|
UpdateTime string `json:"updateTime"` |
|
|
|
ThumbnailURL string `json:"thumbnailURL"` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Digest string `json:"digest"` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
type GetDiskResp struct { |
|
BaseResp |
|
Data struct { |
|
Result struct { |
|
ResultCode string `json:"resultCode"` |
|
ResultDesc interface{} `json:"resultDesc"` |
|
} `json:"result"` |
|
GetDiskResult struct { |
|
ParentCatalogID string `json:"parentCatalogID"` |
|
NodeCount int `json:"nodeCount"` |
|
CatalogList []Catalog `json:"catalogList"` |
|
ContentList []Content `json:"contentList"` |
|
IsCompleted int `json:"isCompleted"` |
|
} `json:"getDiskResult"` |
|
} `json:"data"` |
|
} |
|
|
|
type UploadResp struct { |
|
BaseResp |
|
Data struct { |
|
Result struct { |
|
ResultCode string `json:"resultCode"` |
|
ResultDesc interface{} `json:"resultDesc"` |
|
} `json:"result"` |
|
UploadResult struct { |
|
UploadTaskID string `json:"uploadTaskID"` |
|
RedirectionURL string `json:"redirectionUrl"` |
|
NewContentIDList []struct { |
|
ContentID string `json:"contentID"` |
|
ContentName string `json:"contentName"` |
|
IsNeedUpload string `json:"isNeedUpload"` |
|
FileEtag int64 `json:"fileEtag"` |
|
FileVersion int64 `json:"fileVersion"` |
|
OverridenFlag int `json:"overridenFlag"` |
|
} `json:"newContentIDList"` |
|
CatalogIDList interface{} `json:"catalogIDList"` |
|
IsSlice interface{} `json:"isSlice"` |
|
} `json:"uploadResult"` |
|
} `json:"data"` |
|
} |
|
|
|
type CloudContent struct { |
|
ContentID string `json:"contentID"` |
|
|
|
|
|
|
|
ContentName string `json:"contentName"` |
|
|
|
|
|
ContentSize int64 `json:"contentSize"` |
|
|
|
CreateTime string `json:"createTime"` |
|
|
|
LastUpdateTime string `json:"lastUpdateTime"` |
|
ThumbnailURL string `json:"thumbnailURL"` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
type CloudCatalog struct { |
|
CatalogID string `json:"catalogID"` |
|
CatalogName string `json:"catalogName"` |
|
|
|
CreateTime string `json:"createTime"` |
|
LastUpdateTime string `json:"lastUpdateTime"` |
|
|
|
|
|
} |
|
|
|
type QueryContentListResp struct { |
|
FrontResp |
|
Data struct { |
|
Ret int `json:"ret"` |
|
Reason string `json:"reason"` |
|
Total string `json:"total"` |
|
FileInfos []FileInfo `json:"fileInfos"` |
|
} `json:"data"` |
|
} |
|
|
|
type FileInfo struct { |
|
ID string `json:"id"` |
|
Name string `json:"name"` |
|
Type int64 `json:"type"` |
|
Category int64 `json:"category"` |
|
Md5 string `json:"md5"` |
|
Size string `json:"size"` |
|
ParentId string `json:"parentId"` |
|
GroupID string `json:"groupId"` |
|
UserID string `json:"userId"` |
|
CreateTime string `json:"createTime"` |
|
UpdateTime string `json:"updateTime"` |
|
Ctag string `json:"ctag"` |
|
ParentCategory int64 `json:"parentCategory"` |
|
} |
|
|
|
type PersonalThumbnail struct { |
|
Style string `json:"style"` |
|
Url string `json:"url"` |
|
} |
|
|
|
type PersonalFileItem struct { |
|
FileId string `json:"fileId"` |
|
Name string `json:"name"` |
|
Size int64 `json:"size"` |
|
Type string `json:"type"` |
|
CreatedAt string `json:"createdAt"` |
|
UpdatedAt string `json:"updatedAt"` |
|
Thumbnails []PersonalThumbnail `json:"thumbnailUrls"` |
|
} |
|
|
|
type PersonalListResp struct { |
|
BaseResp |
|
Data struct { |
|
Items []PersonalFileItem `json:"items"` |
|
NextPageCursor string `json:"nextPageCursor"` |
|
} |
|
} |
|
|
|
type PersonalPartInfo struct { |
|
PartNumber int `json:"partNumber"` |
|
UploadUrl string `json:"uploadUrl"` |
|
} |
|
|
|
type PersonalUploadResp struct { |
|
FrontResp |
|
Data struct { |
|
Ret int `json:"ret"` |
|
Reason string `json:"reason"` |
|
UploadId string `json:"uploadId"` |
|
UploadState int `json:"uploadState"` |
|
ExpireTime string `json:"expireTime"` |
|
FileId string `json:"fileId"` |
|
UploadUrl string `json:"uploadUrl"` |
|
} |
|
} |
|
|
|
type RefreshTokenResp struct { |
|
FrontResp |
|
Data struct { |
|
Ret int `json:"ret"` |
|
ExpiresIn int `json:"expiresIn"` |
|
License string `json:"license"` |
|
Scope string `json:"scope"` |
|
UserType int `json:"userType"` |
|
AccessToken string `json:"accessToken"` |
|
TokenType string `json:"tokenType"` |
|
UserID string `json:"userId"` |
|
RefreshToken string `json:"refreshToken"` |
|
} |
|
} |
|
|