mirror of
https://github.com/octoleo/restic.git
synced 2024-11-16 10:05:25 +00:00
Add streaming methods to interface
This commit is contained in:
parent
fdbe2f0c2d
commit
89bf88df7a
@ -1,6 +1,9 @@
|
|||||||
package backend
|
package backend
|
||||||
|
|
||||||
import "errors"
|
import (
|
||||||
|
"errors"
|
||||||
|
"io"
|
||||||
|
)
|
||||||
|
|
||||||
type Type string
|
type Type string
|
||||||
|
|
||||||
@ -26,10 +29,12 @@ type Lister interface {
|
|||||||
|
|
||||||
type Getter interface {
|
type Getter interface {
|
||||||
Get(Type, ID) ([]byte, error)
|
Get(Type, ID) ([]byte, error)
|
||||||
|
GetReader(Type, ID) (io.ReadCloser, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type Creater interface {
|
type Creater interface {
|
||||||
Create(Type, []byte) (ID, error)
|
Create(Type, []byte) (ID, error)
|
||||||
|
CreateFrom(Type, rd io.Reader) (ID, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type Tester interface {
|
type Tester interface {
|
||||||
|
Loading…
Reference in New Issue
Block a user