feat: the upload handler for AliYun OSS is ready

This commit is contained in:
RockYang
2023-09-22 09:56:45 +08:00
parent af6f7a7146
commit e3d6e5f420
10 changed files with 170 additions and 57 deletions

View File

@@ -40,34 +40,6 @@ type AliYunSmsConfig struct {
Domain string
}
type OSSConfig struct {
Active string
Local LocalStorageConfig
Minio MinioConfig
QiNiu QiNiuConfig
}
type MinioConfig struct {
Endpoint string
AccessKey string
AccessSecret string
Bucket string
UseSSL bool
Domain string
}
type QiNiuConfig struct {
Zone string
AccessKey string
AccessSecret string
Bucket string
Domain string
}
type LocalStorageConfig struct {
BasePath string
BaseURL string
}
type RedisConfig struct {
Host string
Port int

38
api/core/types/oss.go Normal file
View File

@@ -0,0 +1,38 @@
package types
type OSSConfig struct {
Active string
Local LocalStorageConfig
Minio MiniOssConfig
QiNiu QiNiuOssConfig
AliYun AliYunOssConfig
}
type MiniOssConfig struct {
Endpoint string
AccessKey string
AccessSecret string
Bucket string
UseSSL bool
Domain string
}
type QiNiuOssConfig struct {
Zone string
AccessKey string
AccessSecret string
Bucket string
Domain string
}
type AliYunOssConfig struct {
Endpoint string
AccessKey string
AccessSecret string
Bucket string
Domain string
}
type LocalStorageConfig struct {
BasePath string
BaseURL string
}