Documentation
¶
Index ¶
- type Db
- type Tx
- func (tx *Tx) Commit() (err error)
- func (tx *Tx) Delete(bucket string, key string) (err error)
- func (tx *Tx) Get(bucket string, key string) (value []byte, err error)
- func (tx *Tx) List(bucket string) (keys chan string, err error)
- func (tx *Tx) MakeBucket(bucket string) (b *bolt.Bucket, err error)
- func (tx *Tx) Put(bucket string, key string, value []byte) (err error)
- func (tx *Tx) Rollback() (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Db ¶
type Db struct {
// contains filtered or unexported fields
}
Db is a generic key-value database that supports transactions and buckets. Keys and bucket names are strings. Values are byte arrays. This struct is an adapter for bolt.
type Tx ¶
type Tx struct {
// contains filtered or unexported fields
}
Tx is a generic transaction. This struct is an adapter for bolt.
func (*Tx) Get ¶
Get retrieves a record from the given bucket. Returns a nil value if the key or bucket does not exist or if the key is a nested bucket.
func (*Tx) MakeBucket ¶
MakeBucket creates a new bucket.
Click to show internal directories.
Click to hide internal directories.