Documentation
¶
Index ¶
- Variables
- func CreateDB(dir string, buckets ...[]byte) (*bolt.DB, error)
- func CreateDirs(dirs ...string)
- func DeleteKeyFromBucket(dir string, key int, bucketName []byte) error
- func OpenDB(dir string) (*bolt.DB, error)
- func Retrieve(dir string, bucketName []byte, key int) ([]byte, error)
- func RetrieveAllKeys(dir string, bucketName []byte) ([][]byte, error)
- func RetrieveAllKeysLim(dir string, bucketName []byte) (int, error)
- func Save(dir string, bucketName []byte, x interface{}, key int) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBucketMissing = errors.New("bucket doesn't exist")
ErrBucketMissing is an error handler for a missing bucket
View Source
var ErrElementNotFound = errors.New("element not found")
ErrElementNotFound is an error handler for a missing element
Functions ¶
func CreateDirs ¶
func CreateDirs(dirs ...string)
CreateDirs creates (db) directories if they don't exist
func DeleteKeyFromBucket ¶
DeleteKeyFromBucket deletes a given key from a bucket
func RetrieveAllKeys ¶
RetrieveAllKeys retrieves all key value pairs from the database
func RetrieveAllKeysLim ¶
RetrieveAllKeysLim gets the total number of keys in a bucket
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.