refactor continues
This commit is contained in:
parent
c038774f2c
commit
51f1eab127
30 changed files with 1373 additions and 474 deletions
25
agent/tactical/tasks/structs.go
Normal file
25
agent/tactical/tasks/structs.go
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
package tasks
|
||||
|
||||
type AutomatedTask struct {
|
||||
ID int `json:"id"`
|
||||
TaskActions []TaskAction `json:"task_actions"`
|
||||
Enabled bool `json:"enabled"`
|
||||
ContinueOnError bool `json:"continue_on_error"`
|
||||
}
|
||||
|
||||
type TaskAction struct {
|
||||
ActionType string `json:"type"`
|
||||
Command string `json:"command"`
|
||||
Shell string `json:"shell"`
|
||||
ScriptName string `json:"script_name"`
|
||||
Code string `json:"code"`
|
||||
Args []string `json:"script_args"`
|
||||
Timeout int `json:"timeout"`
|
||||
}
|
||||
|
||||
type TaskResult struct {
|
||||
Stdout string `json:"stdout"`
|
||||
Stderr string `json:"stderr"`
|
||||
RetCode int `json:"retcode"`
|
||||
ExecTime float64 `json:"execution_time"`
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue