mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
🎨 Support local file system sync & backup (#13663)
* 🎨 Use local file system sync & backup * ⬆️ dejavu * 🎨 Add the settings panel of local file system sync & backup * 📝 Update user guides of local file system sync & backup * 🎨 Adjust supported runtime environments
This commit is contained in:
parent
0386bc9ebd
commit
6ee4705e2a
27 changed files with 408 additions and 32 deletions
|
|
@ -28,6 +28,7 @@ type Sync struct {
|
|||
Provider int `json:"provider"` // 云端存储服务提供者
|
||||
S3 *S3 `json:"s3"` // S3 对象存储服务配置
|
||||
WebDAV *WebDAV `json:"webdav"` // WebDAV 服务配置
|
||||
Local *Local `json:"local"` // 本地文件系统 服务配置
|
||||
}
|
||||
|
||||
func NewSync() *Sync {
|
||||
|
|
@ -63,10 +64,17 @@ type WebDAV struct {
|
|||
ConcurrentReqs int `json:"concurrentReqs"` // 并发请求数
|
||||
}
|
||||
|
||||
type Local struct {
|
||||
Endpoint string `json:"endpoint"` // 服务端点 (本地文件系统目录)
|
||||
Timeout int `json:"timeout"` // 超时时间,单位:秒
|
||||
ConcurrentReqs int `json:"concurrentReqs"` // 并发请求数
|
||||
}
|
||||
|
||||
const (
|
||||
ProviderSiYuan = 0 // ProviderSiYuan 为思源官方提供的云端存储服务
|
||||
ProviderS3 = 2 // ProviderS3 为 S3 协议对象存储提供的云端存储服务
|
||||
ProviderWebDAV = 3 // ProviderWebDAV 为 WebDAV 协议提供的云端存储服务
|
||||
ProviderLocal = 4 // ProviderLocal 为本地文件系统提供的存储服务
|
||||
)
|
||||
|
||||
func ProviderToStr(provider int) string {
|
||||
|
|
@ -77,6 +85,8 @@ func ProviderToStr(provider int) string {
|
|||
return "S3"
|
||||
case ProviderWebDAV:
|
||||
return "WebDAV"
|
||||
case ProviderLocal:
|
||||
return "Local File System"
|
||||
}
|
||||
return "Unknown"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue