package oss_core

import (
	"context"
	"io"
	"mime/multipart"
)

// Uploader 统一存储上传接口
type Uploader interface {
	// UploadFile 接收文件流并上传，返回存储的具体url，标识key和可能的错误
	UploadFile(ctx context.Context, file multipart.File, fileHeader *multipart.FileHeader) (url string, key string, err error)
	// DeleteFile 删除远端存储的文件
	DeleteFile(ctx context.Context, key string) error
	// DownloadFile 获取文件下载的数据流
	DownloadFile(ctx context.Context, key string) (io.ReadCloser, error)
}
