19 lines
383 B
Go
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
|
|
}
|