database

package
v0.0.0-...-87c4e11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	Bolt *bolt.DB
}

func Start

func Start(buckets ...string) (db *DB, err error)

func (*DB) BytesToId

func (db *DB) BytesToId(b []byte) int

func (*DB) Create

func (db *DB) Create(bucket string, key []byte, value []byte) (err error)

func (*DB) CreateID

func (db *DB) CreateID(bucket string) (id int)

func (*DB) Delete

func (db *DB) Delete(bucket string, key []byte)

func (*DB) IdToBytes

func (db *DB) IdToBytes(id int) []byte

func (*DB) Read

func (db *DB) Read(bucket string, key []byte) (value []byte, err error)

func (*DB) Stop

func (db *DB) Stop() error

func (*DB) Update

func (db *DB) Update(bucket string, key []byte, value []byte)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL