[🚀] storage

This commit is contained in:
2026-02-07 16:04:15 +08:00
parent 26666c332f
commit de5efaaaff
4 changed files with 357 additions and 3 deletions

15
pkg/storage/config.go Normal file
View File

@@ -0,0 +1,15 @@
package storage
import "time"
// Config MinIO配置
type Config struct {
Endpoint string `yaml:"endpoint" json:"endpoint"` // MinIO地址
AccessKeyID string `yaml:"access_key_id" json:"access_key_id"` // AccessKey
SecretAccessKey string `yaml:"secret_access_key" json:"secret_access_key"` // SecretKey
UseSSL bool `yaml:"use_ssl" json:"use_ssl"` // 是否使用SSL
BucketName string `yaml:"bucket_name" json:"bucket_name"` // 默认桶名称
Region string `yaml:"region" json:"region"` // 区域
CDNDomain string `yaml:"cdn_domain" json:"cdn_domain"` // CDN域名可选
PresignExpires time.Duration `yaml:"presign_expires" json:"presign_expires"` // 预签名URL过期时间默认15分钟
}