2018-01-29 14:37:26 -05:00
|
|
|
package store
|
|
|
|
|
2018-02-22 13:48:46 -05:00
|
|
|
import "github.com/lbryio/lbry.go/errors"
|
2018-02-07 15:21:20 -05:00
|
|
|
|
2018-05-29 21:38:55 -04:00
|
|
|
// BlobStore is an interface with methods for consistently handling blob storage.
|
2018-01-29 14:37:26 -05:00
|
|
|
type BlobStore interface {
|
|
|
|
Has(string) (bool, error)
|
|
|
|
Get(string) ([]byte, error)
|
|
|
|
Put(string, []byte) error
|
2018-02-02 16:49:20 -05:00
|
|
|
PutSD(string, []byte) error
|
2018-01-29 14:37:26 -05:00
|
|
|
}
|
2018-02-07 15:21:20 -05:00
|
|
|
|
2018-05-29 21:38:55 -04:00
|
|
|
//ErrBlobNotFound is a standard error when a blob is not found in the store.
|
2018-02-07 15:21:20 -05:00
|
|
|
var ErrBlobNotFound = errors.Base("blob not found")
|