datastore

package
v0.0.0-...-10c04df Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package datastore manages opening and closing the bolt datastore as well as allows a central package for getting buckets to work with

Index

Constants

View Source
const (
	BucketProfile = "profiles"
	BucketLog     = "log"
	BucketRemote  = "remote"
)

Supported Buckets

Variables

View Source
var ErrNotFound = errors.New("Value not found")

ErrNotFound is returned when a value isn't found for the passed in key

Functions

func Close

func Close() error

Close closes the bolt datastore

func DB

func DB() *bolt.DB

DB returns the underlying bolt DB

func Delete

func Delete(bucket string, key interface{}) error

Delete removes the value from the DS for the given key

func Get

func Get(bucket string, key interface{}, result interface{}) error

Get gets a value from the DS for the passed in key

func Open

func Open(filename string) error

Open opens a the bolt datastore

func Put

func Put(bucket string, key interface{}, value interface{}) error

Put puts a new value in the DS at the given key

Types

This section is empty.

Jump to

Keyboard shortcuts

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