Versions in this module Expand all Collapse all v4 v4.1.0 Oct 12, 2020 v4.0.0 Feb 24, 2020 Changes in this version + const Version + var ErrAlreadyExists = errors.New("already exists") + var ErrBadType = errors.New("provided data must be a struct or a pointer to struct") + var ErrDifferentCodec = errors.New("the selected codec is incompatible with this bucket") + var ErrIdxNotFound = errors.New("index not found") + var ErrIncompatibleValue = errors.New("incompatible value") + var ErrNilParam = errors.New("param must not be nil") + var ErrNoID = errors.New("missing struct tag id or ID field") + var ErrNoName = errors.New("provided target must have a name") + var ErrNotFound = errors.New("not found") + var ErrNotInTransaction = errors.New("not in transaction") + var ErrPtrNeeded = errors.New("provided target must be a pointer to a valid variable") + var ErrSlicePtrNeeded = errors.New("provided target must be a pointer to slice") + var ErrStructPtrNeeded = errors.New("provided target must be a pointer to struct") + var ErrUnknownTag = errors.New("unknown tag") + var ErrZeroID = errors.New("id field must not be a zero value") + func Batch() func(*Options) error + func BoltOptions(mode os.FileMode, options *bolt.Options) func(*Options) error + func Codec(c codec.MarshalUnmarshaler) func(*Options) error + func Limit(limit int) func(*index.Options) + func Reverse() func(*index.Options) + func Root(root ...string) func(*Options) error + func Skip(offset int) func(*index.Options) + func UseDB(b *bolt.DB) func(*Options) error + type BucketScanner interface + PrefixScan func(prefix string) []Node + RangeScan func(min, max string) []Node + type DB struct + Bolt *bolt.DB + func Open(path string, rainstormOptions ...func(*Options) error) (*DB, error) + func (s *DB) Close() error + type Finder interface + All func(to interface{}, options ...func(*index.Options)) error + AllByIndex func(fieldName string, to interface{}, options ...func(*index.Options)) error + Count func(data interface{}) (int, error) + Find func(fieldName string, value interface{}, to interface{}, ...) error + One func(fieldName string, value interface{}, to interface{}) error + Prefix func(fieldName string, prefix string, to interface{}, ...) error + Range func(fieldName string, min, max, to interface{}, options ...func(*index.Options)) error + Select func(matchers ...q.Matcher) Query + type KeyValueStore interface + Delete func(bucketName string, key interface{}) error + Get func(bucketName string, key interface{}, to interface{}) error + GetBytes func(bucketName string, key interface{}) ([]byte, error) + KeyExists func(bucketName string, key interface{}) (bool, error) + Set func(bucketName string, key interface{}, value interface{}) error + SetBytes func(bucketName string, key interface{}, value []byte) error + type Node interface + Begin func(writable bool) (Node, error) + Bucket func() []string + Codec func() codec.MarshalUnmarshaler + CreateBucketIfNotExists func(tx *bolt.Tx, bucket string) (*bolt.Bucket, error) + From func(addend ...string) Node + GetBucket func(tx *bolt.Tx, children ...string) *bolt.Bucket + WithBatch func(enabled bool) Node + WithCodec func(codec codec.MarshalUnmarshaler) Node + WithTransaction func(tx *bolt.Tx) Node + type Options struct + type Query interface + Bucket func(string) Query + Count func(interface{}) (int, error) + Delete func(interface{}) error + Each func(interface{}, func(interface{}) error) error + Find func(interface{}) error + First func(interface{}) error + Limit func(int) Query + OrderBy func(...string) Query + Raw func() ([][]byte, error) + RawEach func(func([]byte, []byte) error) error + Reverse func() Query + Skip func(int) Query + type Tx interface + Commit func() error + Rollback func() error + type TypeStore interface + DeleteStruct func(data interface{}) error + Drop func(data interface{}) error + Init func(data interface{}) error + ReIndex func(data interface{}) error + Save func(data interface{}) error + Update func(data interface{}) error + UpdateField func(data interface{}, fieldName string, value interface{}) error Other modules containing this package github.com/AndersonBargas/rainstorm github.com/AndersonBargas/rainstorm/v3 github.com/AndersonBargas/rainstorm/v5