mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
✨ 数据同步支持接入第三方云端存储 https://github.com/siyuan-note/siyuan/issues/6446 https://github.com/siyuan-note/siyuan/issues/6426
This commit is contained in:
parent
b31c6d6f26
commit
e80d95997d
3 changed files with 120 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue