3 // ProjectType definition
4 type ProjectType string
7 TypePathMap = "PathMap"
8 TypeCloudSync = "CloudSync"
12 // Project Status definition
14 StatusErrorConfig = "ErrorConfig"
15 StatusDisable = "Disable"
16 StatusEnable = "Enable"
18 StatusSyncing = "Syncing"
21 // IPROJECT Project interface
22 type IPROJECT interface {
23 Add(cfg ProjectConfig) (*ProjectConfig, error) // Add a new project
24 Delete() error // Delete a project
25 GetProject() *ProjectConfig // Get project public configuration
26 UpdateProject(prj ProjectConfig) (*ProjectConfig, error) // Update project configuration
27 GetServer() *XdsServer // Get XdsServer that holds this project
28 Sync() error // Force project files synchronization
29 IsInSync() (bool, error) // Check if project files are in-sync
32 // ProjectConfig is the config for one project
33 type ProjectConfig struct {
35 ServerID string `json:"serverId"`
36 Label string `json:"label"`
37 ClientPath string `json:"clientPath"`
38 ServerPath string `json:"serverPath"`
39 Type ProjectType `json:"type"`
40 Status string `json:"status"`
41 IsInSync bool `json:"isInSync"`
42 DefaultSdk string `json:"defaultSdk"`