Fixed current project selection on deletion - Dashboard
[src/xds/xds-agent.git] / lib / apiv1 / projects.go
1 package apiv1
2
3 // ProjectType definition
4 type ProjectType string
5
6 const (
7         TypePathMap   = "PathMap"
8         TypeCloudSync = "CloudSync"
9         TypeCifsSmb   = "CIFS"
10 )
11
12 // Project Status definition
13 const (
14         StatusErrorConfig = "ErrorConfig"
15         StatusDisable     = "Disable"
16         StatusEnable      = "Enable"
17         StatusPause       = "Pause"
18         StatusSyncing     = "Syncing"
19 )
20
21 // ProjectConfig is the config for one project
22 type ProjectConfig struct {
23         ID         string      `json:"id"`
24         ServerID   string      `json:"serverId"`
25         Label      string      `json:"label"`
26         ClientPath string      `json:"clientPath"`
27         ServerPath string      `json:"serverPath"`
28         Type       ProjectType `json:"type"`
29         Status     string      `json:"status"`
30         IsInSync   bool        `json:"isInSync"`
31         DefaultSdk string      `json:"defaultSdk"`
32         ClientData string      `json:"clientData"` // free form field that can used by client
33 }
34
35 // ProjectConfigUpdatableFields List fields that can be updated using Update function
36 var ProjectConfigUpdatableFields = []string{
37         "Label", "DefaultSdk", "ClientData",
38 }