暂存
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m32s

This commit is contained in:
2026-08-06 09:35:00 +08:00
parent 8659dfc658
commit 88cc5e96ec
75 changed files with 6520 additions and 513 deletions

View File

@@ -8,6 +8,8 @@ import (
type Provider interface {
Upload(ctx context.Context, key string, reader io.Reader, contentType string) error
UploadWithMetadata(ctx context.Context, key string, reader io.Reader, contentType string, metadata map[string]string) error
Stat(ctx context.Context, key string) (*ObjectMetadata, error)
Download(ctx context.Context, key string) (io.ReadCloser, error)
DownloadToTemp(ctx context.Context, key string) (localPath string, cleanup func(), err error)
Delete(ctx context.Context, key string) error
@@ -15,3 +17,10 @@ type Provider interface {
GetUploadURL(ctx context.Context, key string, contentType string, expires time.Duration) (string, error)
GetDownloadURL(ctx context.Context, key string, expires time.Duration) (string, error)
}
// ObjectMetadata 是对象存储返回的受控对象属性。
type ObjectMetadata struct {
Size int64
ContentType string
Metadata map[string]string
}