Documentation ¶
Overview ¶
Package db exports multiple utilities to work with BoltDB databases.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BDB ¶
type BDB struct {
// contains filtered or unexported fields
}
BDB is a simple wrapper around a BoltDB database.
func Open ¶
Open tries to get the database on the received path and create the specified collection (bucket in the case of a BoltDB database) if it does not already exist. If all the previous operations have succeeded it returns the database as a *BDB. If something goes wrong while opening the database o while creating the collection it returns a error.
func (*BDB) Get ¶
Get returns specified element on a collection if it exist. If the received key doesn't exist it returns an error.
func (*BDB) Remove ¶
Remove removes the specified element on a collection. It never returns a non-nil error.