Versions in this module Expand all Collapse all v0 v0.1.0 Apr 17, 2025 v0.0.2 Mar 27, 2025 Changes in this version + const BoolFalse + const BoolSize + const BoolTrue + const CapacityReductionFactor + const MaxExcessCapacityFactor + const Uint64Size + var ErrClosed = errors.New("closed") + var ErrNotFound = errors.New("not found") + func AtomicClear(readerDB Iteratee, deleterDB KeyValueDeleter) error + func AtomicClearPrefix(readerDB Iteratee, deleterDB KeyValueDeleter, prefix []byte) error + func Clear(db Database, writeSize int) error + func ClearPrefix(db Database, prefix []byte, writeSize int) error + func Count(db Iteratee) (int, error) + func GetBool(db KeyValueReader, key []byte) (bool, error) + func GetID(db KeyValueReader, key []byte) (ids.ID, error) + func GetTimestamp(db KeyValueReader, key []byte) (time.Time, error) + func GetUInt32(db KeyValueReader, key []byte) (uint32, error) + func GetUInt64(db KeyValueReader, key []byte) (uint64, error) + func IsEmpty(db Iteratee) (bool, error) + func PackUInt32(val uint32) []byte + func PackUInt64(val uint64) []byte + func ParseID(b []byte) (ids.ID, error) + func ParseTimestamp(b []byte) (time.Time, error) + func ParseUInt32(b []byte) (uint32, error) + func ParseUInt64(b []byte) (uint64, error) + func PutBool(db KeyValueWriter, key []byte, b bool) error + func PutID(db KeyValueWriter, key []byte, val ids.ID) error + func PutTimestamp(db KeyValueWriter, key []byte, val time.Time) error + func PutUInt32(db KeyValueWriter, key []byte, val uint32) error + func PutUInt64(db KeyValueWriter, key []byte, val uint64) error + func Size(db Iteratee) (int, error) + type Batch interface + Inner func() Batch + Replay func(w KeyValueWriterDeleter) error + Reset func() + Size func() int + Write func() error + type BatchOp struct + Delete bool + Key []byte + Value []byte + type BatchOps struct + Ops []BatchOp + func (b *BatchOps) Delete(key []byte) error + func (b *BatchOps) Put(key, value []byte) error + func (b *BatchOps) Replay(w KeyValueWriterDeleter) error + func (b *BatchOps) Reset() + func (b *BatchOps) Size() int + type Batcher interface + NewBatch func() Batch + type Compacter interface + Compact func(start []byte, limit []byte) error + type Database interface + type Iteratee interface + NewIterator func() Iterator + NewIteratorWithPrefix func(prefix []byte) Iterator + NewIteratorWithStart func(start []byte) Iterator + NewIteratorWithStartAndPrefix func(start, prefix []byte) Iterator + type Iterator interface + Error func() error + Key func() []byte + Next func() bool + Release func() + Value func() []byte + type IteratorError struct + Err error + func (*IteratorError) Key() []byte + func (*IteratorError) Next() bool + func (*IteratorError) Release() + func (*IteratorError) Value() []byte + func (i *IteratorError) Error() error + type KeyValueDeleter interface + Delete func(key []byte) error + type KeyValueReader interface + Get func(key []byte) ([]byte, error) + Has func(key []byte) (bool, error) + type KeyValueReaderWriter interface + type KeyValueReaderWriterDeleter interface + type KeyValueWriter interface + Put func(key []byte, value []byte) error + type KeyValueWriterDeleter interface + type MockBatch struct + func NewMockBatch(ctrl *gomock.Controller) *MockBatch + func (m *MockBatch) Delete(arg0 []byte) error + func (m *MockBatch) EXPECT() *MockBatchMockRecorder + func (m *MockBatch) Inner() Batch + func (m *MockBatch) Put(arg0, arg1 []byte) error + func (m *MockBatch) Replay(arg0 KeyValueWriterDeleter) error + func (m *MockBatch) Reset() + func (m *MockBatch) Size() int + func (m *MockBatch) Write() error + type MockBatchMockRecorder struct + func (mr *MockBatchMockRecorder) Delete(arg0 any) *gomock.Call + func (mr *MockBatchMockRecorder) Inner() *gomock.Call + func (mr *MockBatchMockRecorder) Put(arg0, arg1 any) *gomock.Call + func (mr *MockBatchMockRecorder) Replay(arg0 any) *gomock.Call + func (mr *MockBatchMockRecorder) Reset() *gomock.Call + func (mr *MockBatchMockRecorder) Size() *gomock.Call + func (mr *MockBatchMockRecorder) Write() *gomock.Call + type MockIterator struct + func NewMockIterator(ctrl *gomock.Controller) *MockIterator + func (m *MockIterator) EXPECT() *MockIteratorMockRecorder + func (m *MockIterator) Error() error + func (m *MockIterator) Key() []byte + func (m *MockIterator) Next() bool + func (m *MockIterator) Release() + func (m *MockIterator) Value() []byte + type MockIteratorMockRecorder struct + func (mr *MockIteratorMockRecorder) Error() *gomock.Call + func (mr *MockIteratorMockRecorder) Key() *gomock.Call + func (mr *MockIteratorMockRecorder) Next() *gomock.Call + func (mr *MockIteratorMockRecorder) Release() *gomock.Call + func (mr *MockIteratorMockRecorder) Value() *gomock.Call