single db with prefixes, dump/restore, blacklisting on user deletion

This commit is contained in:
ston1th 2018-09-23 23:56:12 +02:00
commit d4971cda89
20 changed files with 264 additions and 163 deletions

View file

@ -8,10 +8,16 @@ func storeErr(i interface{}) error {
return fmt.Errorf("store: %s", i)
}
var ErrKeyNotFound = storeErr("key not found")
var (
ErrKeyNotFound = storeErr("key not found")
ErrWriterIsNil = storeErr("writer is nil")
ErrReaderIsNil = storeErr("reader is nil")
)
type Store interface {
Marshaler
Dumper
Restorer
Get(string, interface{}) error
Set(string, interface{}) error
ForEach(func(string, []byte) error) error