forked from apps/featurer
29 lines
1.2 KiB
Go
29 lines
1.2 KiB
Go
package core
|
|
|
|
import "errors"
|
|
|
|
const (
|
|
// DatastorePathDelimiter is a delimiter that should be used for path elements delimiter.
|
|
DatastorePathDelimiter = "/"
|
|
// ServiceNameDatastore is a service name for data storage implementation.
|
|
ServiceNameDatastore = "datastore"
|
|
)
|
|
|
|
var (
|
|
// ErrDatastore indicates that error appeared somewhere in data storage service.
|
|
ErrDatastore = errors.New("datastore")
|
|
// ErrDatastoreAppNotFound appears when requesting data for application which wasn't registered via API or loaded
|
|
// from disk.
|
|
ErrDatastoreAppNotFound = errors.New("application not found")
|
|
// ErrDatastoreServiceIsInvalid appears when data storage implementation isn't conforming to interface.
|
|
ErrDatastoreServiceIsInvalid = errors.New("invalid datastore implementation")
|
|
// ErrDatastoreValueInvalid appears when trying to get value from datastore using incompatible getter (e.g.
|
|
// when trying to get bool with GetString).
|
|
ErrDatastoreValueInvalid = errors.New("requested value is invalid")
|
|
// ErrDatastoreValueNotFound appears when trying to get value with path which isn't known.
|
|
ErrDatastoreValueNotFound = errors.New("requested value not found")
|
|
)
|
|
|
|
// DataStore is an interface for data storage implementations.
|
|
type DataStore interface{}
|