// Copyright (C) 2023 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, any) error
	Set(string, any) error
	ForEach(func(string, []byte) error) error
	ForEachPrefix(string, func(string, []byte) error) error
	Delete(string) error
	Close() error
}
