summaryrefslogtreecommitdiffstats
path: root/lib/apiv1
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-11-24 01:14:30 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-11-24 01:37:24 +0100
commit4d843d2bde236ec23810d0904dfb8aebbc53a37b (patch)
tree84c01452f01620cedb7bf6bcb608a0eade82161b /lib/apiv1
parent38c0c21a969e621c725245ce91c78e77076c5ce7 (diff)
New dashboard improvements.
- add build buttons - add build settings support and backup into project clientData - improved async alert - fixed project dropdown Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'lib/apiv1')
-rw-r--r--lib/apiv1/events.go7
-rw-r--r--lib/apiv1/projects.go6
2 files changed, 10 insertions, 3 deletions
diff --git a/lib/apiv1/events.go b/lib/apiv1/events.go
index cdd0889..b2fda62 100644
--- a/lib/apiv1/events.go
+++ b/lib/apiv1/events.go
@@ -40,9 +40,10 @@ var EVTAllList = []string{
// EventMsg Event message send over Websocket, data format depend to Type (see DecodeXXX function)
type EventMsg struct {
- Time string `json:"time"`
- Type string `json:"type"`
- Data interface{} `json:"data"`
+ Time string `json:"time"` // Timestamp
+ FromSessionID string `json:"sessionID"` // Session ID of client that emits this event
+ Type string `json:"type"` // Data type
+ Data interface{} `json:"data"` // Data
}
// DecodeServerCfg Helper to decode Data field type ServerCfg
diff --git a/lib/apiv1/projects.go b/lib/apiv1/projects.go
index d76fa09..b1e64c8 100644
--- a/lib/apiv1/projects.go
+++ b/lib/apiv1/projects.go
@@ -29,4 +29,10 @@ type ProjectConfig struct {
Status string `json:"status"`
IsInSync bool `json:"isInSync"`
DefaultSdk string `json:"defaultSdk"`
+ ClientData string `json:"clientData"` // free form field that can used by client
+}
+
+// ProjectConfigUpdatableFields List fields that can be updated using Update function
+var ProjectConfigUpdatableFields = []string{
+ "Label", "DefaultSdk", "ClientData",
}