Versions in this module Expand all Collapse all v1 v1.1.0 Sep 9, 2017 Changes in this version + var ErrAlreadyExists = errors.New("already exists") + var ErrNilParam = errors.New("param must not be nil") + var ErrNotFound = errors.New("not found") + type Index interface + Add func(value []byte, targetID []byte) error + All func(value []byte, opts *Options) ([][]byte, error) + AllRecords func(opts *Options) ([][]byte, error) + Get func(value []byte) []byte + Prefix func(prefix []byte, opts *Options) ([][]byte, error) + Range func(min []byte, max []byte, opts *Options) ([][]byte, error) + Remove func(value []byte) error + RemoveID func(id []byte) error + type ListIndex struct + IDs *UniqueIndex + IndexBucket *bolt.Bucket + Parent *bolt.Bucket + func NewListIndex(parent *bolt.Bucket, indexName []byte) (*ListIndex, error) + func (idx *ListIndex) Add(newValue []byte, targetID []byte) error + func (idx *ListIndex) All(value []byte, opts *Options) ([][]byte, error) + func (idx *ListIndex) AllRecords(opts *Options) ([][]byte, error) + func (idx *ListIndex) Get(value []byte) []byte + func (idx *ListIndex) Prefix(prefix []byte, opts *Options) ([][]byte, error) + func (idx *ListIndex) Range(min []byte, max []byte, opts *Options) ([][]byte, error) + func (idx *ListIndex) Remove(value []byte) error + func (idx *ListIndex) RemoveID(targetID []byte) error + type Options struct + Limit int + Reverse bool + Skip int + func NewOptions() *Options + type UniqueIndex struct + IndexBucket *bolt.Bucket + Parent *bolt.Bucket + func NewUniqueIndex(parent *bolt.Bucket, indexName []byte) (*UniqueIndex, error) + func (idx *UniqueIndex) Add(value []byte, targetID []byte) error + func (idx *UniqueIndex) All(value []byte, opts *Options) ([][]byte, error) + func (idx *UniqueIndex) AllRecords(opts *Options) ([][]byte, error) + func (idx *UniqueIndex) Get(value []byte) []byte + func (idx *UniqueIndex) Prefix(prefix []byte, opts *Options) ([][]byte, error) + func (idx *UniqueIndex) Range(min []byte, max []byte, opts *Options) ([][]byte, error) + func (idx *UniqueIndex) Remove(value []byte) error + func (idx *UniqueIndex) RemoveID(id []byte) error