bolt

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UBoltDB

type UBoltDB struct {
	// contains filtered or unexported fields
}

UBoltDB is the db struct by bolt

func NewDB

func NewDB(path string) (*UBoltDB, error)

NewDB initialize the new blot DB, create if no file in given path

func (*UBoltDB) Close

func (u *UBoltDB) Close() error

Close the blot DB

func (*UBoltDB) CreateBucket

func (u *UBoltDB) CreateBucket(bucketName string) error

CreateBucket create new bucket by name

func (*UBoltDB) Del

func (u *UBoltDB) Del(bucketName, key string) error

Del val by key from bucket

func (*UBoltDB) DeleteBucket

func (u *UBoltDB) DeleteBucket(bucketName string) error

DeleteBucket delete the bucket by name

func (*UBoltDB) Find

func (u *UBoltDB) Find(bucketName, prefix string, args ...int) (rows []*db.Row, err error)

Find the rows from bucket by prefix

func (*UBoltDB) Get

func (u *UBoltDB) Get(bucketName, key string) (val []byte, err error)

Get val by key from bucket

func (*UBoltDB) Set

func (u *UBoltDB) Set(bucketName, key string, val []byte) error

Set key/val into bucket

Jump to

Keyboard shortcuts

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