store

package
v0.0.0-...-0627081 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(bucket []byte, key []byte) error

Delete deletes key from boltdb Bucket

func GetStorable

func GetStorable(items Storable) error

GetStorable loads all items from boltdb Bucket

func Load

func Load(bucket []byte, key []byte, v interface{}) error

Load loads item from boltdb Bucket

func Save

func Save(bucket []byte, key []byte, v interface{}) error

Save stores item in boltdb Bucket as JSON

Types

type Storable

type Storable interface {
	// Bucket returns the bucket name
	Bucket() []byte
	// Next is an iterator, takes key returns ref to item instance
	Next([]byte) interface{}
}

Storable defines collection interface

Jump to

Keyboard shortcuts

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