This commit is contained in:
Liang Ding 2022-11-11 15:33:05 +08:00
parent b31c6d6f26
commit e80d95997d
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
3 changed files with 120 additions and 0 deletions

View file

@ -301,6 +301,33 @@ func SetSyncMode(mode int) (err error) {
return
}
func SetSyncProvider(provider int) (err error) {
syncLock.Lock()
defer syncLock.Unlock()
Conf.Sync.Provider = provider
Conf.Save()
return
}
func SetSyncProviderS3(s3 *conf.S3) (err error) {
syncLock.Lock()
defer syncLock.Unlock()
Conf.Sync.S3 = s3
Conf.Save()
return
}
func SetSyncProviderWebDAV(webdav *conf.WebDAV) (err error) {
syncLock.Lock()
defer syncLock.Unlock()
Conf.Sync.WebDAV = webdav
Conf.Save()
return
}
var syncLock = sync.Mutex{}
func CreateCloudSyncDir(name string) (err error) {