kra-new/internal/service/dto/task.go

29 lines
946 B
Go

package dto
import "encoding/json"
type TaskRequest struct {
ID uint `json:"ID"`
Name string `json:"name"`
Description string `json:"description"`
Spec string `json:"spec"`
WithSeconds bool `json:"withSeconds"`
ExecutorType string `json:"executorType"`
MethodName string `json:"methodName"`
Params json.RawMessage `json:"params"`
HTTPURL string `json:"httpUrl"`
HTTPMethod string `json:"httpMethod"`
HTTPHeader json.RawMessage `json:"httpHeader"`
HTTPBody string `json:"httpBody"`
HTTPAllowPrivate bool `json:"httpAllowPrivate"`
Enabled bool `json:"enabled"`
}
type DeleteTaskRequest struct {
ID uint `json:"ID"`
}
type ToggleTaskRequest struct {
ID uint `json:"ID"`
Enabled bool `json:"enabled"`
}