This commit is contained in:
Liang Ding 2022-11-09 15:11:00 +08:00
parent 9aadfe3041
commit 9e544ed154
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
5 changed files with 57 additions and 19 deletions

View file

@ -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 存储服务提供的云端存储服务
)