32 lines
840 B
Go
32 lines
840 B
Go
package task
|
|
|
|
import cdssdk "gitlink.org.cn/cloudream/common/sdks/storage"
|
|
|
|
var _ = Register[*CacheMovePackage, *CacheMovePackageStatus]()
|
|
|
|
type CacheMovePackage struct {
|
|
TaskInfoBase
|
|
UserID int64 `json:"userID"`
|
|
PackageID int64 `json:"packageID"`
|
|
StgNodeID int64 `json:"stgNodeID"`
|
|
}
|
|
type CacheMovePackageStatus struct {
|
|
TaskStatusBase
|
|
Error string `json:"error"`
|
|
CacheInfos []cdssdk.ObjectCacheInfo `json:"cacheInfos"`
|
|
}
|
|
|
|
func NewCacheMovePackage(userID int64, packageID int64, stgNodeID int64) *CacheMovePackage {
|
|
return &CacheMovePackage{
|
|
UserID: userID,
|
|
PackageID: packageID,
|
|
StgNodeID: stgNodeID,
|
|
}
|
|
}
|
|
func NewCacheMovePackageStatus(err string, cacheInfos []cdssdk.ObjectCacheInfo) *CacheMovePackageStatus {
|
|
return &CacheMovePackageStatus{
|
|
Error: err,
|
|
CacheInfos: cacheInfos,
|
|
}
|
|
}
|