initial commit

This commit is contained in:
ston1th 2023-03-14 01:43:04 +01:00
commit 60fb40d61a
34 changed files with 2571 additions and 0 deletions

23
pkg/store/store.go Normal file
View file

@ -0,0 +1,23 @@
// Copyright (C) 2022 Marius Schellenberger
package store
import "errors"
var (
ErrKeyNotFound = errors.New("store: key not found")
ErrWriterIsNil = errors.New("store: writer is nil")
ErrReaderIsNil = errors.New("store: reader is nil")
)
type Store interface {
Marshaler
Dumper
Restorer
Get(string, interface{}) error
Set(string, interface{}) error
ForEach(func(string, []byte) error) error
ForEachPrefix(string, func(string, []byte) error) error
Delete(string) error
Close() error
}