featurer/server/internal/services/core/datastore.go
Stanislav N. aka pztrn a901ba49e5
All checks were successful
Linting and tests / Tests (push) Successful in 59s
Linting and tests / Linting (push) Successful in 1m12s
Datastore version one.
Closes #2
2024-10-14 01:14:28 +05:00

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{}