boltstorage

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2018 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

Storage represents a BoltDB storage

func New

func New(b string) *Storage

New creates and returns a storage

func (Storage) Get

func (s Storage) Get(key []byte) ([]byte, error)

Get finds a given key in db, and returns its value

func (*Storage) Load

func (s *Storage) Load(file string) error

Load loads a new db handle into storage, and closes old db handle if exists

func (*Storage) LoadAndIterate added in v0.1.1

func (s *Storage) LoadAndIterate(file string, fn storage.IterationFunc) error

LoadAndIterate loads a new db handle, iterate through newly loaded db, and closes old db handle if exists

Jump to

Keyboard shortcuts

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