From 7c7d90a781082c6bd22d12a5e2451ca61a5198af Mon Sep 17 00:00:00 2001 From: Sebastien Douheret Date: Wed, 29 Nov 2017 11:19:00 +0100 Subject: Renamed apiv1 lib to xaapiv1. xa prefix (for Xds Agent) is safest to avoid confusion with xs prefix (for Xds Server) Signed-off-by: Sebastien Douheret --- lib/xaapiv1/projects.go | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 lib/xaapiv1/projects.go (limited to 'lib/xaapiv1/projects.go') diff --git a/lib/xaapiv1/projects.go b/lib/xaapiv1/projects.go new file mode 100644 index 0000000..51c5837 --- /dev/null +++ b/lib/xaapiv1/projects.go @@ -0,0 +1,38 @@ +package xaapiv1 + +// ProjectType definition +type ProjectType string + +const ( + TypePathMap = "PathMap" + TypeCloudSync = "CloudSync" + TypeCifsSmb = "CIFS" +) + +// Project Status definition +const ( + StatusErrorConfig = "ErrorConfig" + StatusDisable = "Disable" + StatusEnable = "Enable" + StatusPause = "Pause" + StatusSyncing = "Syncing" +) + +// ProjectConfig is the config for one project +type ProjectConfig struct { + ID string `json:"id"` + ServerID string `json:"serverId"` + Label string `json:"label"` + ClientPath string `json:"clientPath"` + ServerPath string `json:"serverPath"` + Type ProjectType `json:"type"` + 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", +} -- cgit 1.2.3-korg