morffix/types/task.go
Samuel Lorch 5ecfd81967
All checks were successful
/ release (push) Successful in 52s
preserve file extension
2025-03-19 20:59:38 +01:00

37 lines
1.1 KiB
Go

package types
import (
"encoding/json"
"git.lastassault.de/speatzle/morffix/constants"
)
type TaskStart struct {
ID int `json:"id"`
FileID int `json:"file_id"`
FileMD5 []byte `json:"file_md5"`
FileExtension string `json:"file_extension"`
Type constants.TaskType `json:"type"`
Data json.RawMessage
FfmpegCommand FFmpegCommand `json:"ffmpeg_command"`
}
type Task struct {
ID int `json:"id"`
FileID int `json:"file_id"`
FileMD5 []byte `json:"md5"`
FileExtension string `json:"file_extension"`
Type constants.TaskType `json:"type"`
Status constants.TaskStatus `json:"status"`
FfmpegCommand FFmpegCommand `json:"ffmpeg_command"`
Log []string `json:"log"`
}
type TaskStatus struct {
Task Task `json:"task"`
}
type TaskStatusRequest struct {
ID int `json:"id" db:"id"`
LogOffset int `json:"log_offset" db:"log_offset"`
}