Add sanity check on pathmap folder creation.
[src/xds/xds-server.git] / lib / folder / folder-interface.go
index 4beccb8..aec773d 100644 (file)
@@ -1,12 +1,12 @@
 package folder
 
 // FolderType definition
-type FolderType int
+type FolderType string
 
 const (
-       TypePathMap   = 1
-       TypeCloudSync = 2
-       TypeCifsSmb   = 3
+       TypePathMap   = "PathMap"
+       TypeCloudSync = "CloudSync"
+       TypeCifsSmb   = "CIFS"
 )
 
 // Folder Status definition
@@ -60,11 +60,12 @@ type FolderConfig struct {
 
 // PathMapConfig Path mapping specific data
 type PathMapConfig struct {
-       ServerPath string `json:"serverPath"`
+       ServerPath   string `json:"serverPath"`
+       CheckFile    string `json:"checkFile"`
+       CheckContent string `json:"checkContent"`
 }
 
 // CloudSyncConfig CloudSync (AKA Syncthing) specific data
 type CloudSyncConfig struct {
-       SyncThingID   string `json:"syncThingID"`
-       BuilderSThgID string `json:"builderSThgID"`
+       SyncThingID string `json:"syncThingID"`
 }