Versions in this module Expand all Collapse all v1 v1.1.0-alpha Oct 31, 2017 v1.0.9 Apr 20, 2018 v1.0.8 Feb 11, 2018 v1.0.7 Jan 19, 2018 v1.0.6 Jan 8, 2018 v1.0.5 Dec 26, 2017 v1.0.4 Dec 11, 2017 v1.0.3 Nov 25, 2017 v1.0.2 Nov 13, 2017 v1.0.1 Oct 31, 2017 v1.0.0 Oct 16, 2017 Changes in this version + const DefaultAllocSize + const DefaultFillPercent + const DefaultMaxBatchDelay + const DefaultMaxBatchSize + const IgnoreNoSync + const MaxKeySize + const MaxValueSize + var DefaultOptions = &Options + var ErrBucketExists = errors.New("bucket already exists") + var ErrBucketNameRequired = errors.New("bucket name required") + var ErrBucketNotFound = errors.New("bucket not found") + var ErrChecksum = errors.New("checksum error") + var ErrDatabaseNotOpen = errors.New("database not open") + var ErrDatabaseOpen = errors.New("database already open") + var ErrDatabaseReadOnly = errors.New("database is in read-only mode") + var ErrIncompatibleValue = errors.New("incompatible value") + var ErrInvalid = errors.New("invalid database") + var ErrKeyRequired = errors.New("key required") + var ErrKeyTooLarge = errors.New("key too large") + var ErrTimeout = errors.New("timeout") + var ErrTxClosed = errors.New("tx closed") + var ErrTxNotWritable = errors.New("tx not writable") + var ErrValueTooLarge = errors.New("value too large") + var ErrVersionMismatch = errors.New("version mismatch") + type Bucket struct + FillPercent float64 + func (b *Bucket) Bucket(name []byte) *Bucket + func (b *Bucket) CreateBucket(key []byte) (*Bucket, error) + func (b *Bucket) CreateBucketIfNotExists(key []byte) (*Bucket, error) + func (b *Bucket) Cursor() *Cursor + func (b *Bucket) Delete(key []byte) error + func (b *Bucket) DeleteBucket(key []byte) error + func (b *Bucket) ForEach(fn func(k, v []byte) error) error + func (b *Bucket) Get(key []byte) []byte + func (b *Bucket) NextSequence() (uint64, error) + func (b *Bucket) Put(key []byte, value []byte) error + func (b *Bucket) Root() pgid + func (b *Bucket) Stats() BucketStats + func (b *Bucket) Tx() *Tx + func (b *Bucket) Writable() bool + type BucketStats struct + BranchAlloc int + BranchInuse int + BranchOverflowN int + BranchPageN int + BucketN int + Depth int + InlineBucketInuse int + InlineBucketN int + KeyN int + LeafAlloc int + LeafInuse int + LeafOverflowN int + LeafPageN int + func (s *BucketStats) Add(other BucketStats) + type Cursor struct + func (c *Cursor) Bucket() *Bucket + func (c *Cursor) Delete() error + func (c *Cursor) First() (key []byte, value []byte) + func (c *Cursor) Last() (key []byte, value []byte) + func (c *Cursor) Next() (key []byte, value []byte) + func (c *Cursor) Prev() (key []byte, value []byte) + func (c *Cursor) Seek(seek []byte) (key []byte, value []byte) + type DB struct + AllocSize int + MaxBatchDelay time.Duration + MaxBatchSize int + MmapFlags int + NoGrowSync bool + NoSync bool + StrictMode bool + func Open(path string, mode os.FileMode, options *Options) (*DB, error) + func (db *DB) Batch(fn func(*Tx) error) error + func (db *DB) Begin(writable bool) (*Tx, error) + func (db *DB) Close() error + func (db *DB) GoString() string + func (db *DB) Info() *Info + func (db *DB) IsReadOnly() bool + func (db *DB) Path() string + func (db *DB) Stats() Stats + func (db *DB) String() string + func (db *DB) Sync() error + func (db *DB) Update(fn func(*Tx) error) error + func (db *DB) View(fn func(*Tx) error) error + type Info struct + Data uintptr + PageSize int + type Options struct + InitialMmapSize int + MmapFlags int + NoGrowSync bool + ReadOnly bool + Timeout time.Duration + type PageInfo struct + Count int + ID int + OverflowCount int + Type string + type Stats struct + FreeAlloc int + FreePageN int + FreelistInuse int + OpenTxN int + PendingPageN int + TxN int + TxStats TxStats + func (s *Stats) Sub(other *Stats) Stats + type Tx struct + WriteFlag int + func (tx *Tx) Bucket(name []byte) *Bucket + func (tx *Tx) Check() <-chan error + func (tx *Tx) Commit() error + func (tx *Tx) Copy(w io.Writer) error + func (tx *Tx) CopyFile(path string, mode os.FileMode) error + func (tx *Tx) CreateBucket(name []byte) (*Bucket, error) + func (tx *Tx) CreateBucketIfNotExists(name []byte) (*Bucket, error) + func (tx *Tx) Cursor() *Cursor + func (tx *Tx) DB() *DB + func (tx *Tx) DeleteBucket(name []byte) error + func (tx *Tx) ForEach(fn func(name []byte, b *Bucket) error) error + func (tx *Tx) ID() int + func (tx *Tx) OnCommit(fn func()) + func (tx *Tx) Page(id int) (*PageInfo, error) + func (tx *Tx) Rollback() error + func (tx *Tx) Size() int64 + func (tx *Tx) Stats() TxStats + func (tx *Tx) Writable() bool + func (tx *Tx) WriteTo(w io.Writer) (n int64, err error) + type TxStats struct + CursorCount int + NodeCount int + NodeDeref int + PageAlloc int + PageCount int + Rebalance int + RebalanceTime time.Duration + Spill int + SpillTime time.Duration + Split int + Write int + WriteTime time.Duration + func (s *TxStats) Sub(other *TxStats) TxStats