Versions in this module Expand all Collapse all v0 v0.0.1 May 26, 2024 Changes in this version + const BatchCount + var ErrCloseStore = errors.New("close store error") + var ErrOpenStore = errors.New("open store error") + type BadgerStore struct + func (s *BadgerStore) Add(updates map[string]ItemInfo) (err error) + func (s *BadgerStore) Close() (err error) + func (s *BadgerStore) Delete(key string) (err error) + func (s *BadgerStore) Find(key string) (item ItemInfo) + func (s *BadgerStore) Info() string + func (s *BadgerStore) Items() (items []*ItemInfo, err error) + func (s *BadgerStore) Keys(prefix string, pattern string, limit int) (keys []string) + func (s *BadgerStore) Maintenance() + func (s *BadgerStore) Open() (err error) + func (s *BadgerStore) Reset() (err error) + func (s *BadgerStore) Type() DatabaseType + type DatabaseType string + const BadgerDatabaseType + type ItemInfo struct + Hash string + MimeType string + ModTime time.Time + Name string + Path string + Size int64 + Type ItemType + func Item(item *badger.Item) ItemInfo + func NewItemInfo(name string, path string, modTime time.Time, size int64, t ItemType) (i ItemInfo) + func (o *ItemInfo) Decode(data []byte) + func (o *ItemInfo) Encode() []byte + func (o *ItemInfo) KeyName() string + func (o *ItemInfo) String() string + func (o *ItemInfo) XXhash() string + type ItemType string + type Store interface + Add func(map[string]ItemInfo) error + Close func() error + Delete func(key string) error + Find func(key string) ItemInfo + Info func() string + Items func() ([]*ItemInfo, error) + Keys func(prefix string, pattern string, limit int) []string + Maintenance func() + Open func() error + Reset func() error + Type func() DatabaseType + func NewBadgerStore(storePath string, inMemory bool) Store + func NewDiskBadgerStore(storePath string) Store + func NewInMemoryBadgerStore() Store + func NewStore(c config.StoreConfig) (s Store, err error)