Files
nebula/internal/storage/storage.go
2026-03-10 16:26:48 +08:00

21 lines
416 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package storage
import (
"io"
)
// Storage 定义文件存储接口支持本地存储、OSS、S3 等
type Storage interface {
// Save 保存文件,返回存储路径
Save(filename string, content io.Reader) (string, error)
// Delete 删除文件
Delete(path string) error
// GetURL 获取文件的访问 URL
GetURL(path string) string
// Exists 检查文件是否存在
Exists(path string) bool
}