Cleanup and improvements
[src/xds/xds-server.git] / lib / folder / folder-interface.go
index c04cbd7..5036c4d 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
@@ -27,6 +27,8 @@ type IFOLDER interface {
        Add(cfg FolderConfig) (*FolderConfig, error)              // Add a new folder
        GetConfig() FolderConfig                                  // Get folder public configuration
        GetFullPath(dir string) string                            // Get folder full path
+       ConvPathCli2Svr(s string) string                          // Convert path from Client to Server
+       ConvPathSvr2Cli(s string) string                          // Convert path from Server to Client
        Remove() error                                            // Remove a folder
        RegisterEventChange(cb *EventCB, data *EventCBData) error // Request events registration (sent through WS)
        UnRegisterEventChange() error                             // Un-register events
@@ -63,6 +65,5 @@ type PathMapConfig struct {
 
 // CloudSyncConfig CloudSync (AKA Syncthing) specific data
 type CloudSyncConfig struct {
-       SyncThingID   string `json:"syncThingID"`
-       BuilderSThgID string `json:"builderSThgID"`
+       SyncThingID string `json:"syncThingID"`
 }