Documentation ¶
Index ¶
- Constants
- func DeferRollback(tx *bolt.Tx, success *bool)
- func FindBucket(b *bolt.Bucket, path []string) (*bolt.Bucket, string)
- func I2B(v uint64) []byte
- type Client
- func (c *Client) Close() error
- func (client *Client) DeleteWithTransaction(bucket []byte, id string) error
- func (client *Client) InitEntity(initEntityCallback TransactionCallback) error
- func (c *Client) Open() (string, error)
- func (c *Client) Path() string
- func (client *Client) ReadTransaction(read TransactionCallback) error
- func (client *Client) WriteTransaction(write TransactionCallback) error
- type Config
- type TransactionCallback
Constants ¶
View Source
const ( // DefaultBindAddress is the default binding interface if none is specified. DefaultDir = "" DefaultFilename = "boltdb.db" )
Variables ¶
This section is empty.
Functions ¶
func DeferRollback ¶
func FindBucket ¶
Find nested bucked according to path. In case there is no some bucket in path, then return last not found name of bucket.
Types ¶
type Client ¶
Client represents a boltdbclient to the underlying BoltDB data store.
func (*Client) DeleteWithTransaction ¶
Delete entry from bucket
func (*Client) InitEntity ¶
func (client *Client) InitEntity(initEntityCallback TransactionCallback) error
Creation of initial entities (for example buckets)
func (*Client) ReadTransaction ¶
func (client *Client) ReadTransaction(read TransactionCallback) error
Read transaction with callback
func (*Client) WriteTransaction ¶
func (client *Client) WriteTransaction(write TransactionCallback) error
Write transaction with callback
type Config ¶
func (*Config) WithDefaults ¶
WithDefaults takes the given config and returns a new config with any required default values set.
type TransactionCallback ¶
Click to show internal directories.
Click to hide internal directories.