feat(ks3): add KS3 object storage support

Add Kingsoft Cloud KS3 as a supported storage provider, including
  backend service implementation, storage config UI, and provider
  scheme recognition throughout the codebase.
This commit is contained in:
ChenRussell
2026-05-01 19:20:25 +08:00
committed by lyingbug
parent 6f3679716f
commit 42348eb40d
16 changed files with 523 additions and 15 deletions
@@ -126,6 +126,17 @@ func NewFileServiceFromStorageConfig(
}
return svc, p, err
case "ks3":
if sec == nil || sec.KS3 == nil || sec.KS3.Endpoint == "" || sec.KS3.Region == "" || sec.KS3.AccessKey == "" || sec.KS3.SecretKey == "" || sec.KS3.BucketName == "" {
return nil, p, fmt.Errorf("incomplete ks3 config")
}
pathPrefix := strings.TrimSpace(sec.KS3.PathPrefix)
if pathPrefix == "" {
pathPrefix = "weknora/"
}
svc, err := NewKS3FileService(sec.KS3.Endpoint, sec.KS3.Region, sec.KS3.AccessKey, sec.KS3.SecretKey, sec.KS3.BucketName, pathPrefix)
return svc, p, err
default:
return nil, p, fmt.Errorf("unsupported provider %q", p)
}