Introduce CreateBlob() method for backend

This commit is contained in:
Alexander Neumann
2015-02-15 17:09:49 +01:00
parent f8f8107d55
commit 35636a9d92
5 changed files with 168 additions and 1 deletions

View File

@@ -23,6 +23,11 @@ var (
ErrAlreadyPresent = errors.New("blob is already present in backend")
)
type Blob interface {
io.WriteCloser
ID() (ID, error)
}
type Lister interface {
List(Type) (IDs, error)
}
@@ -35,6 +40,7 @@ type Getter interface {
type Creater interface {
Create(Type, []byte) (ID, error)
CreateFrom(Type, io.Reader) (ID, error)
CreateBlob(Type) (Blob, error)
}
type Tester interface {