2016-09-21 16:18:22 -07:00
|
|
|
package storage
|
2015-07-23 03:04:01 -07:00
|
|
|
|
2016-09-21 16:18:22 -07:00
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
"fmt"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
// ErrPathOutsideStore indicates that the returned path would be
|
|
|
|
// outside the store
|
|
|
|
ErrPathOutsideStore = errors.New("path outside file store")
|
|
|
|
)
|
2015-12-18 18:47:35 -08:00
|
|
|
|
2015-10-30 17:31:02 -07:00
|
|
|
// ErrMetaNotFound indicates we did not find a particular piece
|
|
|
|
// of metadata in the store
|
2015-12-18 18:47:35 -08:00
|
|
|
type ErrMetaNotFound struct {
|
2016-01-07 18:43:01 -08:00
|
|
|
Resource string
|
2015-12-18 18:47:35 -08:00
|
|
|
}
|
2015-07-23 03:04:01 -07:00
|
|
|
|
|
|
|
func (err ErrMetaNotFound) Error() string {
|
2016-01-07 18:43:01 -08:00
|
|
|
return fmt.Sprintf("%s trust data unavailable. Has a notary repository been initialized?", err.Resource)
|
2015-07-23 03:04:01 -07:00
|
|
|
}
|