filer/store/store.go
2023-08-25 02:26:44 +02:00

19 lines
383 B
Go

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
}