Documentation
¶
Index ¶
- type BasicResult
- type CreateTaskResult
- type ExportResult
- type FileInfo
- type FileJob
- type FileJobPage
- type FileJobStatus
- type FilterInfo
- type OutputMode
- type Preset
- type PreviewPairResult
- type ProgressSnapshot
- type ResultSummary
- type ScanResult
- type SelectDirResult
- type SelectPathsResult
- type Task
- type TaskConfig
- type TaskState
- type TaskStatusResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicResult ¶
BasicResult 基础返回结果
type CreateTaskResult ¶
type CreateTaskResult struct {
Code int `json:"code"`
Message string `json:"message"`
TaskID string `json:"taskId"`
}
CreateTaskResult 创建任务结果
type ExportResult ¶
type ExportResult struct {
Code int `json:"code"`
Message string `json:"message"`
Path string `json:"path"`
}
ExportResult 导出结果
type FileInfo ¶
type FileInfo struct {
Path string `json:"path"`
Name string `json:"name"`
Format string `json:"format"`
Size int64 `json:"size"`
ModTime string `json:"modTime"`
}
FileInfo 文件信息
type FileJob ¶
type FileJob struct {
JobID string `json:"jobId"`
TaskID string `json:"taskId"`
SourcePath string `json:"sourcePath"`
TargetPath string `json:"targetPath"`
Format string `json:"format"`
Attempt int `json:"attempt"`
MaxAttempts int `json:"maxAttempts"`
Status FileJobStatus `json:"status"`
ErrorCode string `json:"errorCode"`
ErrorMessage string `json:"errorMessage"`
BytesBefore int64 `json:"bytesBefore"`
BytesAfter int64 `json:"bytesAfter"`
DurationMs int64 `json:"durationMs"`
}
FileJob 单文件任务
type FileJobPage ¶
type FileJobPage struct {
Code int `json:"code"`
Message string `json:"message"`
Total int `json:"total"`
Page int `json:"page"`
PageSize int `json:"pageSize"`
Items []*FileJob `json:"items"`
}
FileJobPage 文件任务分页结果
type FileJobStatus ¶
type FileJobStatus string
FileJobStatus 单文件状态
const ( FileJobStatusPending FileJobStatus = "PENDING" FileJobStatusRunning FileJobStatus = "RUNNING" FileJobStatusSuccess FileJobStatus = "SUCCESS" FileJobStatusFailed FileJobStatus = "FAILED" FileJobStatusSkippedNoGain FileJobStatus = "SKIPPED_NO_GAIN" )
type FilterInfo ¶
FilterInfo 过滤文件信息
type OutputMode ¶
type OutputMode string
OutputMode 输出模式
const ( OutputModeAuto OutputMode = "AUTO" OutputModeManual OutputMode = "MANUAL" )
type PreviewPairResult ¶
type PreviewPairResult struct {
Code int `json:"code"`
Message string `json:"message"`
JobID string `json:"jobId"`
SourcePath string `json:"sourcePath"`
TargetPath string `json:"targetPath"`
SourceSize int64 `json:"sourceSize"`
TargetSize int64 `json:"targetSize"`
SourceBase64 string `json:"sourceBase64"`
TargetBase64 string `json:"targetBase64"`
}
PreviewPairResult 预览对结果
type ProgressSnapshot ¶
type ProgressSnapshot struct {
TaskID string `json:"taskId"`
State string `json:"state"`
TotalFiles int `json:"totalFiles"`
DoneFiles int `json:"doneFiles"`
SuccessFiles int `json:"successFiles"`
FailedFiles int `json:"failedFiles"`
CurrentFile string `json:"currentFile"`
CurrentFileProgressPercent float64 `json:"currentFileProgressPercent"`
ElapsedSeconds int `json:"elapsedSeconds"`
RemainingSeconds int `json:"remainingSeconds"`
ETASeconds int `json:"etaSeconds"`
ThroughputFilesPerSec float64 `json:"throughputFilesPerSec"`
}
ProgressSnapshot 进度快照
type ResultSummary ¶
type ResultSummary struct {
TotalFiles int `json:"totalFiles"`
SuccessFiles int `json:"successFiles"`
FailedFiles int `json:"failedFiles"`
BytesBefore int64 `json:"bytesBefore"`
BytesAfter int64 `json:"bytesAfter"`
BytesSaved int64 `json:"bytesSaved"`
SavedPercent float64 `json:"savedPercent"`
}
ResultSummary 结果统计
type ScanResult ¶
type ScanResult struct {
Code int `json:"code"`
Message string `json:"message"`
TotalFiles int `json:"totalFiles"`
TotalBytes int64 `json:"totalBytes"`
SupportedFiles []FileInfo `json:"supportedFiles"`
FilteredFiles []FilterInfo `json:"filteredFiles"`
}
ScanResult 扫描结果
type SelectDirResult ¶
type SelectDirResult struct {
Code int `json:"code"`
Message string `json:"message"`
Path string `json:"path"`
}
SelectDirResult 选择目录结果
type SelectPathsResult ¶
type SelectPathsResult struct {
Code int `json:"code"`
Message string `json:"message"`
Paths []string `json:"paths"`
}
SelectPathsResult 选择路径结果
type Task ¶
type Task struct {
TaskID string `json:"taskId"`
State TaskState `json:"state"`
Config TaskConfig `json:"config"`
CreatedAt string `json:"createdAt"`
StartedAt string `json:"startedAt"`
FinishedAt string `json:"finishedAt"`
}
Task 任务实体
type TaskConfig ¶
type TaskConfig struct {
InputPaths []string `json:"inputPaths"`
OutputMode string `json:"outputMode"`
OutputDir string `json:"outputDir"`
KeepStruct bool `json:"keepStructure"`
NameConflictPolicy string `json:"nameConflictPolicy"`
Preset string `json:"preset"`
QualityMin int `json:"qualityMin"`
MaxWidth int `json:"maxWidth"`
MaxHeight int `json:"maxHeight"`
RetryTimes int `json:"retryTimes"`
RetryBackoffSeconds []int `json:"retryBackoffSeconds"`
}
TaskConfig 任务配置
Click to show internal directories.
Click to hide internal directories.