Better error handling and annotation
This commit is contained in:
parent
cbee80fc6d
commit
9b75f2cab0
3 changed files with 46 additions and 29 deletions
|
@ -1,5 +1,7 @@
|
|||
package backend
|
||||
|
||||
import "errors"
|
||||
|
||||
type Type string
|
||||
|
||||
const (
|
||||
|
@ -14,6 +16,10 @@ const (
|
|||
BackendVersion = 1
|
||||
)
|
||||
|
||||
var (
|
||||
ErrAlreadyPresent = errors.New("blob is already present in backend")
|
||||
)
|
||||
|
||||
type Server interface {
|
||||
Create(Type, []byte) (ID, error)
|
||||
Get(Type, ID) ([]byte, error)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue