Skip to content
CharlesworthPublic

About

A threadsafe abstraction of the BoltDB k/v store

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Report Card GoDoc

byteStore

An abstraction library to enable simple Get, Put and other operations on top of the fantastic BoltDB key value store. Import the library and get a new ByteStore with the byteStore.New() function to get started.

byteStore.New(dbFileName string) (ByteStore, error)

The user can simply use the ByteStore object's methods and not worry about database complexities. All methods are thread safe, backed by BoltDB's transactional nature, so use indiscriminately throughout your Goroutines!

(ByteStore) Get(bucket string, key string) []byte

(ByteStore) GetBucket(bucket string) []KeyValue

(ByteStore) GetBucketValues(bucket string) [][]byte

(ByteStore) Put(bucket string, key string, value []byte) error

(ByteStore) Delete(bucket string, key string) error

(ByteStore) DeleteBucket(bucket string) error

(ByteStore) Close() error

The ByteStore type also exposes the underlying BoltDB driver publicly (ByteStore.BoltDB), meaning that if you want to do any more complex transactions not offered by the ByteStore methods, you can use boltDB directly. I hope you enjoy the library, pull and feature requests are welcome.

About

A threadsafe abstraction of the BoltDB k/v store

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

⌂ 换网址