From 2f7828d01f4c4ca2909f95f098627cd5475ed225 Mon Sep 17 00:00:00 2001 From: Sebastien Douheret Date: Wed, 29 Nov 2017 08:54:00 +0100 Subject: Refit source files to have a public xs-apiv1 lib package. Signed-off-by: Sebastien Douheret --- lib/syncthing/stfolder.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/syncthing/stfolder.go') diff --git a/lib/syncthing/stfolder.go b/lib/syncthing/stfolder.go index 503ba4b..1a5a7ec 100644 --- a/lib/syncthing/stfolder.go +++ b/lib/syncthing/stfolder.go @@ -6,13 +6,13 @@ import ( "path/filepath" "strings" - "github.com/iotbzh/xds-server/lib/folder" + "github.com/iotbzh/xds-server/lib/xsapiv1" stconfig "github.com/syncthing/syncthing/lib/config" "github.com/syncthing/syncthing/lib/protocol" ) // FolderLoadFromStConfig Load/Retrieve folder config from syncthing database -func (s *SyncThing) FolderLoadFromStConfig(f *[]folder.FolderConfig) error { +func (s *SyncThing) FolderLoadFromStConfig(f *[]xsapiv1.FolderConfig) error { defaultSdk := "" // cannot know which was the default sdk @@ -36,15 +36,15 @@ func (s *SyncThing) FolderLoadFromStConfig(f *[]folder.FolderConfig) error { if cliPath == "" { cliPath = stFld.Path } - *f = append(*f, folder.FolderConfig{ + *f = append(*f, xsapiv1.FolderConfig{ ID: stFld.ID, Label: stFld.Label, ClientPath: strings.TrimRight(cliPath, "/"), - Type: folder.TypeCloudSync, - Status: folder.StatusDisable, + Type: xsapiv1.TypeCloudSync, + Status: xsapiv1.StatusDisable, DefaultSdk: defaultSdk, RootPath: s.conf.FileConf.ShareRootDir, - DataCloudSync: folder.CloudSyncConfig{SyncThingID: devID}, + DataCloudSync: xsapiv1.CloudSyncConfig{SyncThingID: devID}, }) } @@ -52,7 +52,7 @@ func (s *SyncThing) FolderLoadFromStConfig(f *[]folder.FolderConfig) error { } // FolderChange is called when configuration has changed -func (s *SyncThing) FolderChange(f folder.FolderConfig) (string, error) { +func (s *SyncThing) FolderChange(f xsapiv1.FolderConfig) (string, error) { // Get current config stCfg, err := s.ConfigGet() -- cgit 1.2.3-korg