mirror of
https://git.fightbot.fun/hxuanyu/FileRelay.git
synced 2026-02-15 06:01:43 +08:00
16 lines
331 B
Go
16 lines
331 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
|
|
Exists(ctx context.Context, path string) (bool, error)
|
|
}
|
|
|
|
var GlobalStorage Storage
|