Versions in this module Expand all Collapse all v0 v0.1.0 May 1, 2024 v0.0.1 Feb 21, 2024 Changes in this version + const KeyPrefixLength + var ErrRegistryNotFound = errors.New("registry not found") + var StorageProvider = NewLocalPersistentStorageProvider() + type Ledger struct + func (l *Ledger) Close(delete bool) error + func (l *Ledger) Log(t uint32, v []byte) error + type PersistentStorageApi interface + Close func() error + Delete func(key string) error + Update func(func(txn PersistentStorageTransactionApi) error) error + View func(func(txn PersistentStorageTransactionApi) error) error + type PersistentStorageIteratorApi interface + Close func() + Key func() string + Next func() + Rewind func() + Valid func() bool + Value func() ([]byte, error) + type PersistentStorageProvider interface + NewPersistentStorageInterface func(path string, readOnly bool) (PersistentStorageApi, error) + func NewJsonFilePersistentStorageProvider(filename string) PersistentStorageProvider + func NewLocalPersistentStorageProvider() PersistentStorageProvider + type PersistentStorageTransactionApi interface + Get func(key string) ([]byte, error) + NewIterator func(prefix string) PersistentStorageIteratorApi + Set func(key string, value []byte) error + func NewBase64PersistentStorageTransaction(data map[string]string) PersistentStorageTransactionApi + type Registry interface + NewReplay func(id string) ReplayHandler + Prefix func() string + type ReplayHandler interface + Done func() (bool, error) + Entry func(t uint32, data []byte) error + Metadata func(data []byte) error + type Store struct + func Open(path string, readOnly bool) (*Store, error) + func (s *Store) Close() error + func (s *Store) DeleteKey(key string) error + func (s *Store) MakeKey(registry Registry, id string) string + func (s *Store) NewKey(key string, metadata []byte) (*Ledger, error) + func (s *Store) OpenKey(key string) (*Ledger, error) + func (s *Store) Register(registries []Registry) + func (s *Store) Replay() error