- Add plane adapter client with test coverage - Add task external refs migration - Update workflow service with tests - Add HTTP handler tests - Update router and middleware tests - Update database models and queries - Update scheduler jobs - Update storage store - Update server main and docker-compose - Update roadmaps and documentation
28 lines
737 B
Go
28 lines
737 B
Go
package workflow
|
|
|
|
import "encoding/json"
|
|
|
|
type TaskStatus string
|
|
|
|
const (
|
|
StatusPending TaskStatus = "pending"
|
|
StatusQueued TaskStatus = "queued"
|
|
StatusRunning TaskStatus = "running"
|
|
StatusCompleted TaskStatus = "completed"
|
|
StatusFailed TaskStatus = "failed"
|
|
StatusCanceled TaskStatus = "canceled"
|
|
)
|
|
|
|
type CreateTaskInput struct {
|
|
Title string `json:"title"`
|
|
Source string `json:"source"`
|
|
Payload json.RawMessage `json:"payload"`
|
|
External *ExternalRefInput `json:"external,omitempty"`
|
|
}
|
|
|
|
type ExternalRefInput struct {
|
|
Provider string `json:"provider"`
|
|
ID string `json:"id"`
|
|
URL string `json:"url"`
|
|
Metadata json.RawMessage `json:"metadata"`
|
|
}
|