From c17d641c25668df21efce918fb3d1e2ba8b8c5a0 Mon Sep 17 00:00:00 2001 From: DullJZ <79080562+DullJZ@users.noreply.github.com> Date: Mon, 29 Sep 2025 23:11:09 +0800 Subject: [PATCH] Remove use_ssl --- config/config.example.yaml | 5 ----- internal/config/config.go | 23 +++++++++++------------ 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/config/config.example.yaml b/config/config.example.yaml index b943faa..b4bab07 100644 --- a/config/config.example.yaml +++ b/config/config.example.yaml @@ -46,7 +46,6 @@ buckets: max_size: "100GB" # 最大容量限制 weight: 10 # 权重(用于加权负载均衡) enabled: true - use_ssl: true path_style: false # AWS S3使用虚拟主机风格 virtual: false # 这是真实存储桶 @@ -59,7 +58,6 @@ buckets: max_size: "50GB" weight: 5 enabled: true - use_ssl: false path_style: true # MinIO通常使用路径风格 virtual: false # 这是真实存储桶 @@ -72,7 +70,6 @@ buckets: max_size: "100GB" # 显示的最大容量 weight: 10 # 权重(用于在真实存储桶间负载均衡) enabled: true - use_ssl: true path_style: false virtual: true # 这是虚拟存储桶 @@ -85,7 +82,6 @@ buckets: max_size: "50GB" weight: 10 enabled: true - use_ssl: true path_style: false virtual: true # 这是虚拟存储桶 @@ -98,7 +94,6 @@ buckets: max_size: "200GB" weight: 15 enabled: true - use_ssl: true path_style: false virtual: false # 这是真实存储桶 diff --git a/internal/config/config.go b/internal/config/config.go index 9f63bf3..3a0f9e8 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -29,18 +29,17 @@ type ServerConfig struct { // BucketConfig S3存储桶配置 type BucketConfig struct { - Name string `yaml:"name"` // 桶名称 - Endpoint string `yaml:"endpoint"` // S3端点 - Region string `yaml:"region"` // 区域 - AccessKeyID string `yaml:"access_key_id"` // 访问密钥ID - SecretAccessKey string `yaml:"secret_access_key"` // 访问密钥 - MaxSize string `yaml:"max_size"` // 最大容量 (例如: "10GB") - MaxSizeBytes int64 `yaml:"-"` // 内部使用,字节为单位 - Weight int `yaml:"weight"` // 权重 (用于负载均衡) - Enabled bool `yaml:"enabled"` // 是否启用 - UseSSL bool `yaml:"use_ssl"` // 是否使用SSL - PathStyle bool `yaml:"path_style"` // 是否使用路径风格访问 - Virtual bool `yaml:"virtual"` // 是否为虚拟存储桶(仅S3 API中可见) + Name string `yaml:"name"` // 桶名称 + Endpoint string `yaml:"endpoint"` // S3端点 + Region string `yaml:"region"` // 区域 + AccessKeyID string `yaml:"access_key_id"` // 访问密钥ID + SecretAccessKey string `yaml:"secret_access_key"` // 访问密钥 + MaxSize string `yaml:"max_size"` // 最大容量 (例如: "10GB") + MaxSizeBytes int64 `yaml:"-"` // 内部使用,字节为单位 + Weight int `yaml:"weight"` // 权重 (用于负载均衡) + Enabled bool `yaml:"enabled"` // 是否启用 + PathStyle bool `yaml:"path_style"` // 是否使用路径风格访问 + Virtual bool `yaml:"virtual"` // 是否为虚拟存储桶(仅S3 API中可见) } // BalancerConfig 负载均衡配置