aboutsummaryrefslogtreecommitdiffstats
path: root/lib/apiv1/exec.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-05-15 10:57:25 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-05-15 10:57:25 +0200
commit2028752efc680c4c409f6f36bcf88104493d42c4 (patch)
tree0baea9dbfbb7e63bca0996f96b5bcf409d5730e9 /lib/apiv1/exec.go
parenta2df8ec64eef1acd699633e42806e75dc7a7ee55 (diff)
Fix invalid json encoding definition
Diffstat (limited to 'lib/apiv1/exec.go')
-rw-r--r--lib/apiv1/exec.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/apiv1/exec.go b/lib/apiv1/exec.go
index f7beea6..b0bfd41 100644
--- a/lib/apiv1/exec.go
+++ b/lib/apiv1/exec.go
@@ -22,7 +22,7 @@ type ExecArgs struct {
// ExecOutMsg Message send on each output (stdout+stderr) of executed command
type ExecOutMsg struct {
CmdID string `json:"cmdID"`
- Timestamp string `json:timestamp`
+ Timestamp string `json:"timestamp"`
Stdout string `json:"stdout"`
Stderr string `json:"stderr"`
}
@@ -30,13 +30,15 @@ type ExecOutMsg struct {
// ExecExitMsg Message send when executed command exited
type ExecExitMsg struct {
CmdID string `json:"cmdID"`
- Timestamp string `json:timestamp`
+ Timestamp string `json:"timestamp"`
Code int `json:"code"`
Error error `json:"error"`
}
-// Event name send in WS
+// ExecOutEvent Event send in WS when characters are received
const ExecOutEvent = "exec:output"
+
+// ExecExitEvent Event send in WS when program exited
const ExecExitEvent = "exec:exit"
var execCommandID = 1