summaryrefslogtreecommitdiffstats
path: root/lib/syncthing/stfolder.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-11-29 08:54:00 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-11-29 11:10:30 +0100
commit2f7828d01f4c4ca2909f95f098627cd5475ed225 (patch)
treeb5e71920b813b95cae3e32044be08b99223348ec /lib/syncthing/stfolder.go
parent5caebfb4b7c3b73988f067082b219ce5b7f409ba (diff)
Refit source files to have a public xs-apiv1 lib package.
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'lib/syncthing/stfolder.go')
-rw-r--r--lib/syncthing/stfolder.go14
1 files changed, 7 insertions, 7 deletions
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()