Versions in this module Expand all Collapse all v0 v0.12.4 Jan 17, 2024 Changes in this version + var ErrSkipSetValue = errors.New("skip setting metadata value") + type StorageItem struct + func (s *StorageItem) ClearIndex(tx *bolt.Tx, index string) error + func (s *StorageItem) Commit() error + func (s *StorageItem) Get(k string) *Value + func (s *StorageItem) GetAndSetValue(key string, fn func(*Value) (*Value, error)) error + func (s *StorageItem) GetExternal(k string) ([]byte, error) + func (s *StorageItem) ID() string + func (s *StorageItem) Indexes() (out []string) + func (s *StorageItem) Keys() []string + func (s *StorageItem) Metadata() *StorageItem + func (s *StorageItem) Queue(fn func(b *bolt.Bucket) error) + func (s *StorageItem) SetExternal(k string, dt []byte) error + func (s *StorageItem) SetValue(b *bolt.Bucket, key string, v *Value) error + func (s *StorageItem) Storage() *Store + func (s *StorageItem) Update(fn func(b *bolt.Bucket) error) error + type Store struct + func NewStore(dbPath string) (*Store, error) + func (s *Store) All() ([]*StorageItem, error) + func (s *Store) Clear(id string) error + func (s *Store) Close() error + func (s *Store) DB() *bolt.DB + func (s *Store) Get(id string) (*StorageItem, bool) + func (s *Store) Probe(index string) (bool, error) + func (s *Store) Search(ctx context.Context, index string) ([]*StorageItem, error) + func (s *Store) Update(id string, fn func(b *bolt.Bucket) error) error + func (s *Store) View(id string, fn func(b *bolt.Bucket) error) error + type Value struct + Index string + Value json.RawMessage + func NewValue(v interface{}) (*Value, error) + func (v *Value) Unmarshal(target interface{}) error