diff options
author | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-11-24 01:28:00 +0100 |
---|---|---|
committer | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-11-24 01:28:00 +0100 |
commit | 67a7d6e46143410a5fa9cfa2554023ab7687ea34 (patch) | |
tree | 6168592c5cc72a39795aa49a5683a81f2b872a19 /lib/folder/folder-interface.go | |
parent | d2335afe1058153a3aad27fa483499b0639e096c (diff) |
Add folder update support and ClientData field.
- folder config can be updated using PUT /folders/:id route
- ClientData field of FolderConfig can be used by client to store any data (used from example by dashboard to save build settings)
Diffstat (limited to 'lib/folder/folder-interface.go')
-rw-r--r-- | lib/folder/folder-interface.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/folder/folder-interface.go b/lib/folder/folder-interface.go index 9eb6829..3208869 100644 --- a/lib/folder/folder-interface.go +++ b/lib/folder/folder-interface.go @@ -30,6 +30,7 @@ type IFOLDER interface { ConvPathCli2Svr(s string) string // Convert path from Client to Server ConvPathSvr2Cli(s string) string // Convert path from Server to Client Remove() error // Remove a folder + Update(cfg FolderConfig) (*FolderConfig, error) // Update a new folder RegisterEventChange(cb *EventCB, data *EventCBData) error // Request events registration (sent through WS) UnRegisterEventChange() error // Un-register events Sync() error // Force folder files synchronization @@ -45,6 +46,7 @@ type FolderConfig 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 // Not exported fields from REST API point of view RootPath string `json:"-"` @@ -58,6 +60,11 @@ type FolderConfig struct { DataCloudSync CloudSyncConfig `json:"dataCloudSync,omitempty"` } +// FolderConfigUpdatableFields List fields that can be updated using Update function +var FolderConfigUpdatableFields = []string{ + "Label", "DefaultSdk", "ClientData", +} + // PathMapConfig Path mapping specific data type PathMapConfig struct { ServerPath string `json:"serverPath"` |