Documentation
¶
Index ¶
- func New() backend.Initializer
- func NewWithOpts(opts *bolt.Options) backend.Initializer
- type Backend
- type Bucket
- func (b *Bucket) Cursor() backend.Cursor
- func (b *Bucket) Delete(key []byte) error
- func (b *Bucket) DeleteBucket(key []byte) (err error)
- func (b *Bucket) ForEach(fn func(key, value []byte) error) (err error)
- func (b *Bucket) Get(key []byte) (value []byte)
- func (b *Bucket) GetBucket(key []byte) (bkt backend.Bucket)
- func (b *Bucket) GetOrCreateBucket(key []byte) (bkt backend.Bucket, err error)
- func (b *Bucket) Put(key, value []byte) error
- type Initializer
- type Transaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWithOpts ¶
func NewWithOpts(opts *bolt.Options) backend.Initializer
NewWithOpts will create a new initializer with the provided opts
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend is the interface wrapper for bolt DB to be used as a Backend
func (*Backend) ReadTransaction ¶
func (b *Backend) ReadTransaction(fn func(backend.Transaction) error) (err error)
ReadTransaction will initialize a new read-only transaction
func (*Backend) Transaction ¶
func (b *Backend) Transaction(fn func(backend.Transaction) error) (err error)
Transaction will initialize a new read-write transaction
type Bucket ¶
type Bucket struct {
// contains filtered or unexported fields
}
Bucket represents a boltDB bucket
func (*Bucket) DeleteBucket ¶ added in v0.2.0
DeleteBucket will get a bucket
func (*Bucket) GetOrCreateBucket ¶
GetOrCreateBucket will get or create a bucket
type Initializer ¶
type Initializer struct {
// contains filtered or unexported fields
}
Initializer initializes a boltDB backend
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
Transaction represents a boltDB transaction
func (*Transaction) DeleteBucket ¶ added in v0.2.1
func (t *Transaction) DeleteBucket(key []byte) (err error)
GetBucket will get a bucket
func (*Transaction) GetBucket ¶
func (t *Transaction) GetBucket(key []byte) (bkt backend.Bucket)
GetBucket will get a bucket
func (*Transaction) GetOrCreateBucket ¶
func (t *Transaction) GetOrCreateBucket(key []byte) (bkt backend.Bucket, err error)
GetOrCreateBucket will get or create a bucket
Click to show internal directories.
Click to hide internal directories.