Added basics of cloud sync

This commit is contained in:
frikky
2020-10-24 20:37:17 +02:00
parent 2a1d0368ee
commit 65ac43e5ef
3 changed files with 237 additions and 59 deletions
+10 -4
View File
@@ -68,16 +68,21 @@ type ExecutionRequest struct {
type SyncFeatures struct {
Apps SyncData `json:"apps" datastore:"apps"`
Workflows SyncData `json:"apps" datastore:"apps"`
Schedules SyncData `json:"apps" datastore:"apps"`
Autocomplete SyncData `json:"apps" datastore:"apps"`
Authentication SyncData `json:"apps" datastore:"apps"`
Workflows SyncData `json:"workflows" datastore:"workflows"`
Schedules SyncData `json:"schedules" datastore:"schedules"`
Autocomplete SyncData `json:"autocomplete" datastore:"autocomplete"`
Authentication SyncData `json:"authentication" datastore:"authentication"`
}
type SyncData struct {
Active bool `json:"active" datastore:"active"`
}
type SyncConfig struct {
Interval int64 `json:"interval" datastore:"interval"`
Apikey string `json:"api_key" datastore:"api_key"`
}
// Role is just used for feedback for a user
type Org struct {
Name string `json:"name" datastore:"name"`
@@ -87,6 +92,7 @@ type Org struct {
Role string `json:"role" datastore:"role"`
Roles []string `json:"roles" datastore:"roles"`
CloudSync bool `json:"cloud_sync" datastore:"CloudSync"`
SyncConfig SyncConfig `json:"sync_config" datastore:"sync_config"`
SyncFeatures SyncFeatures `json:"sync_features" datastore:"sync_features"`
}