37 lines
1.1 KiB
Go
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"`
|
|
}
|