morffix/types/task.go
2024-06-25 18:00:04 +02:00

35 lines
958 B
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"`
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"`
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"`
}