filer/store/store.go

20 lines
383 B
Go
Raw Permalink Normal View History

2023-08-25 02:25:38 +02:00
package store
import (
"io"
"emperror.dev/errors"
"github.com/google/uuid"
)
const (
ErrNotExist = errors.Sentinel("file does not exist")
ErrInvalidStoreKey = errors.Sentinel("invalid $STORAGE key")
)
type Store interface {
WriteFile(id uuid.UUID, data io.Reader, contentType string) error
GetFile(id uuid.UUID) (io.Reader, error)
DeleteFile(id uuid.UUID) error
}