- 添加管理员端 API,用于获取和更新完整配置。 - 添加公共端 API,用于获取非敏感配置信息。 - 增加本地存储(LocalStorage)、S3(S3Storage)、和 WebDAV(WebDAVStorage)存储类型的实现。 - 支持热更新存储配置和保存配置文件至磁盘。 - 更新 Swagger 文档以包含新接口定义。
15 lines
275 B
Go
15 lines
275 B
Go
package storage
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
)
|
|
|
|
type Storage interface {
|
|
Save(ctx context.Context, path string, reader io.Reader) error
|
|
Open(ctx context.Context, path string) (io.ReadCloser, error)
|
|
Delete(ctx context.Context, path string) error
|
|
}
|
|
|
|
var GlobalStorage Storage
|