mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-07-12 16:02:05 +08:00
refactor: update storage interface to use io.Reader for Save method and remove stream implementations
This commit is contained in:
@@ -20,12 +20,7 @@ type Storage interface {
|
||||
Type() types.StorageType
|
||||
Name() string
|
||||
JoinStoragePath(task types.Task) string
|
||||
Save(cttx context.Context, localFilePath, storagePath string) error
|
||||
}
|
||||
|
||||
type StreamStorage interface {
|
||||
Storage
|
||||
NewUploadStream(ctx context.Context, path string) (io.WriteCloser, error)
|
||||
Save(ctx context.Context, reader io.Reader, storagePath string) error
|
||||
}
|
||||
|
||||
var Storages = make(map[string]Storage)
|
||||
|
||||
Reference in New Issue
Block a user