Documentation
¶
Index ¶
- func BucketNotFoundErr(b Bucket) error
- func DeleteByKey(d DB, bucket Bucket, key []byte) error
- func GetByKey(d DB, bucket Bucket, key []byte) ([]byte, error)
- func SetupBuckets(d DB, buckets []Bucket) error
- func StoreKeyValue(d DB, bucket Bucket, key []byte, value interface{}) error
- type Bucket
- type DB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BucketNotFoundErr ¶
BucketNotFoundErr indicates that the given Bucket was not yet created.
func DeleteByKey ¶
DeleteByKey deletes the value stored with the given key from d. If key is not found, the error returned will be nil.
func SetupBuckets ¶
SetupBuckets creates the given Buckets if they do not already exist in d.
Types ¶
type DB ¶
type DB interface {
// Begin(writable bool) (*bolt.Tx, error)
// Close() error
// GoString() string
// Info() *Info
// Path() string
// Stats() Stats
// String() string
Update(fn func(*bolt.Tx) error) error
View(fn func(*bolt.Tx) error) error
}
DB specifies the basic methods that a database must implement to be used as a backend.
Click to show internal directories.
Click to hide internal directories.