31 lines
636 B
Go
31 lines
636 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"`
|
|
Type int `json:"type"`
|
|
Data json.RawMessage
|
|
}
|
|
|
|
type Task struct {
|
|
ID int `json:"id"`
|
|
FileID int `json:"file_id"`
|
|
Type int `json:"type"`
|
|
Status constants.TaskStatus `json:"status"`
|
|
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"`
|
|
}
|