Fixed current project selection on deletion - Dashboard
[src/xds/xds-agent.git] / lib / xaapiv1 / exec.go
1 package xaapiv1
2
3 type (
4         // ExecArgs JSON parameters of /exec command
5         ExecArgs struct {
6                 ID              string   `json:"id" binding:"required"`
7                 SdkID           string   `json:"sdkID"` // sdk ID to use for setting env
8                 CmdID           string   `json:"cmdID"` // command unique ID
9                 Cmd             string   `json:"cmd" binding:"required"`
10                 Args            []string `json:"args"`
11                 Env             []string `json:"env"`
12                 RPath           string   `json:"rpath"`           // relative path into project
13                 TTY             bool     `json:"tty"`             // Use a tty, specific to gdb --tty option
14                 TTYGdbserverFix bool     `json:"ttyGdbserverFix"` // Set to true to activate gdbserver workaround about inferior output
15                 ExitImmediate   bool     `json:"exitImmediate"`   // when true, exit event sent immediately when command exited (IOW, don't wait file synchronization)
16                 CmdTimeout      int      `json:"timeout"`         // command completion timeout in Second
17         }
18
19         // ExecInMsg Message used to received input characters (stdin)
20         ExecInMsg struct {
21                 CmdID     string `json:"cmdID"`
22                 Timestamp string `json:"timestamp"`
23                 Stdin     string `json:"stdin"`
24         }
25
26         // ExecOutMsg Message used to send output characters (stdout+stderr)
27         ExecOutMsg struct {
28                 CmdID     string `json:"cmdID"`
29                 Timestamp string `json:"timestamp"`
30                 Stdout    string `json:"stdout"`
31                 Stderr    string `json:"stderr"`
32         }
33
34         // ExecExitMsg Message sent when executed command exited
35         ExecExitMsg struct {
36                 CmdID     string `json:"cmdID"`
37                 Timestamp string `json:"timestamp"`
38                 Code      int    `json:"code"`
39                 Error     error  `json:"error"`
40         }
41
42         // ExecSignalArgs JSON parameters of /exec/signal command
43         ExecSignalArgs struct {
44                 CmdID  string `json:"cmdID" binding:"required"`  // command id
45                 Signal string `json:"signal" binding:"required"` // signal number
46         }
47 )
48
49 const (
50         // ExecInEvent Event send in WS when characters are sent (stdin)
51         ExecInEvent = "exec:input"
52
53         // ExecOutEvent Event send in WS when characters are received (stdout or stderr)
54         ExecOutEvent = "exec:output"
55
56         // ExecExitEvent Event send in WS when program exited
57         ExecExitEvent = "exec:exit"
58
59         // ExecInferiorInEvent Event send in WS when characters are sent to an inferior (used by gdb inferior/tty)
60         ExecInferiorInEvent = "exec:inferior-input"
61
62         // ExecInferiorOutEvent Event send in WS when characters are received by an inferior
63         ExecInferiorOutEvent = "exec:inferior-output"
64 )