kvdb

package
v0.0.0-...-9ca5070 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDB

func InitDB(dbName string, bucketName string) (*bolt.DB, error)

InitDB init a boltdb object + db file + bucket if needed dbName is the name of the db (folder + .db file) bucketName is the name of the bucket that will contain data

func ReadAll

func ReadAll(db *bolt.DB, bucketName string) (map[string]string, error)

ReadAll reads all data from any boltdb bucketName is the name of the bucket that contains data

func ReadData

func ReadData(db *bolt.DB, bucketName string, key string) (string, error)

ReadData reads any value from boltdb, using a key bucketName is the name of the bucket that contains data

func WriteData

func WriteData(db *bolt.DB, bucketName string, key string, value string) error

WriteData writes data to a bolt db, with key and value bucketName is the name of the bucket that contains data

Types

This section is empty.

Jump to

Keyboard shortcuts

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