Documentation ¶
Overview ¶
Package rumble is a simple key / document store wrapper for boltdb with an API comparable to mgo.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
type Bucket struct { Name string // contains filtered or unexported fields }
Bucket represents a BoltDB bucket. Methods run from Bucket are thread safe as they wrap thread safe operations exposed by BoltDB.
func (*Bucket) Iterate ¶
Iterate returns a new Iterator with the given predicate. If a predicate is given, it will be called against every key:value pair and must return true for the record to be returned by the iterator. A nil predicate may be given to return all values from the bucket. This is useful when a quick check can be done against the data before it is passed to the DB.UnmarshalerFunc
type DB ¶
type DB struct { Bolt *bolt.DB MarshalFunc func(interface{}) ([]byte, error) UnmarshalFunc func([]byte, interface{}) error NewKeyFunc func() []byte }
DB is an abstraction for BoltDB that provides an API compaprable to mgo.
func New ¶
New returns a new rumble.DB at the given path with permissions of 0600 and a timeout of 1 second
func (*DB) Bucket ¶
Bucket returns a new Bucket after executing bolt's CreateBucketIfNotExists. Bucket will panic on any error from bolt.
func (*DB) DeleteBucket ¶
DeleteBucket returns the result from bolt's DeleteBucket operation