JCC-CSScheduler/common/pkgs/mq/executor/task/cache_move_package.go

32 lines
752 B
Go

package task
import cdssdk "gitlink.org.cn/cloudream/common/sdks/storage"
type CacheMovePackage struct {
TaskInfoBase
UserID cdssdk.UserID `json:"userID"`
PackageID cdssdk.PackageID `json:"packageID"`
StgID cdssdk.StorageID `json:"stgID"`
}
type CacheMovePackageStatus struct {
TaskStatusBase
Error string `json:"error"`
}
func NewCacheMovePackage(userID cdssdk.UserID, packageID cdssdk.PackageID, stgID cdssdk.StorageID) *CacheMovePackage {
return &CacheMovePackage{
UserID: userID,
PackageID: packageID,
StgID: stgID,
}
}
func NewCacheMovePackageStatus(err string) *CacheMovePackageStatus {
return &CacheMovePackageStatus{
Error: err,
}
}
func init() {
Register[*CacheMovePackage, *CacheMovePackageStatus]()
}