Discover Packages
github.com/primitivofr/owly/server/common
kvdb
package
Version:
v0.0.0-...-a9ce3c6
Opens a new window with list of versions in this module.
Published: Jan 21, 2021
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
func InitDB(dbName string, bucketName string) (*bolt.DB, error)
func ReadAll(db *bolt.DB, bucketName string) (map[string]string, error)
func ReadData(db *bolt.DB, bucketName string, key string) (string, error)
func WriteData(db *bolt.DB, bucketName string, key string, value string) 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
ReadAll reads all data from any boltdb
bucketName is the name of the bucket that contains data
ReadData reads any value from boltdb, using a key
bucketName is the name of the bucket that contains data
WriteData writes data to a bolt db, with key and value
bucketName is the name of the bucket that contains data
Source Files
¶
Click to show internal directories.
Click to hide internal directories.