Add SCUM file management workbench

This commit is contained in:
npc0-hue
2026-08-04 11:33:34 +08:00
parent 2921edb401
commit f028a343d7
36 changed files with 1384 additions and 158 deletions
+30
View File
@@ -703,6 +703,20 @@ type FileOperationDispatchResponse struct {
Job JobResponse `json:"job"`
}
type DeclaredFileReadSnapshotResponse struct {
ServerInstanceID string `json:"serverInstanceId"`
PluginID string `json:"pluginId"`
Key string `json:"key"`
State string `json:"state"`
Content string `json:"content,omitempty"`
Version int `json:"version,omitempty"`
Checksum string `json:"checksum,omitempty"`
SizeBytes int64 `json:"sizeBytes,omitempty"`
JobID string `json:"jobId,omitempty"`
ReadAt time.Time `json:"readAt,omitempty"`
Reason string `json:"reason,omitempty"`
}
type RunCapacityResponse struct {
MaxJobs int `json:"maxJobs"`
RunningJobs int `json:"runningJobs"`
@@ -1756,6 +1770,22 @@ func FileOperationDispatchFromDomain(result domain.FileOperationDispatchResult)
}
}
func DeclaredFileReadSnapshotFromDomain(snapshot domain.DeclaredFileReadSnapshot) DeclaredFileReadSnapshotResponse {
return DeclaredFileReadSnapshotResponse{
ServerInstanceID: snapshot.ServerInstanceID,
PluginID: snapshot.PluginID,
Key: snapshot.Key,
State: snapshot.State,
Content: snapshot.Content,
Version: snapshot.Version,
Checksum: snapshot.Checksum,
SizeBytes: snapshot.SizeBytes,
JobID: snapshot.JobID,
ReadAt: snapshot.ReadAt,
Reason: snapshot.Reason,
}
}
func RunEndpointFromDomain(endpoint domain.RunEndpoint) RunEndpointResponse {
endpoint = domain.CopyRunEndpoint(endpoint)
return RunEndpointResponse{