mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-29 12:58:48 +01:00
🎨 数据同步接入阿里云 OSS Fix https://github.com/siyuan-note/siyuan/issues/6528
This commit is contained in:
parent
9aadfe3041
commit
9e544ed154
5 changed files with 57 additions and 19 deletions
|
|
@ -27,6 +27,7 @@ type Sync struct {
|
|||
Qiniu *Qiniu `json:"qiniu"` // 七牛云存储服务配置
|
||||
S3 *S3 `json:"s3"` // S3 对象存储服务配置
|
||||
WebDAV *WebDAV `json:"webdav"` // WebDAV 服务配置
|
||||
OSS *OSS `json:"oss"` // 阿里云 OSS 存储服务配置
|
||||
}
|
||||
|
||||
func NewSync() *Sync {
|
||||
|
|
@ -46,6 +47,13 @@ type Qiniu struct {
|
|||
Bucket string `json:"bucket"` // 存储空间
|
||||
}
|
||||
|
||||
type OSS struct {
|
||||
Endpoint string `json:"endpoint"` // 服务端点
|
||||
AccessKey string `json:"accessKey"` // Access Key
|
||||
SecretKey string `json:"secretKey"` // Secret Key
|
||||
Bucket string `json:"bucket"` // 存储空间
|
||||
}
|
||||
|
||||
type S3 struct {
|
||||
Endpoint string `json:"endpoint"` // 服务端点
|
||||
AccessKey string `json:"accessKey"` // Access Key
|
||||
|
|
@ -62,7 +70,8 @@ type WebDAV struct {
|
|||
|
||||
const (
|
||||
ProviderSiYuan = 0 // ProviderSiYuan 为思源官方提供的云端存储服务
|
||||
ProviderQiniu = 1 // ProviderQiniu 为第三方七牛云提供的云端存储服务
|
||||
ProviderQiniu = 1 // ProviderQiniu 为七牛云提供的云端存储服务
|
||||
ProviderS3 = 2 // ProviderS3 为 S3 协议对象存储提供的云端存储服务
|
||||
ProviderWebDAV = 3 // ProviderWebDAV 为 WebDAV 协议提供的云端存储服务
|
||||
ProviderOSS = 4 // ProviderOSS 为阿里云 OSS 存储服务提供的云端存储服务
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue