mirror of
https://git.fightbot.fun/hxuanyu/FileRelay.git
synced 2026-02-15 08:51:44 +08:00
Initial commit
This commit is contained in:
15
internal/storage/storage.go
Normal file
15
internal/storage/storage.go
Normal file
@@ -0,0 +1,15 @@
|
||||
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
|
||||
Exists(ctx context.Context, path string) (bool, error)
|
||||
}
|
||||
|
||||
var GlobalStorage Storage
|
||||
Reference in New Issue
Block a user