boltstorage

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2020 License: Unlicense Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NSStorage

type NSStorage struct {
	Storage
}

NSStorage represents a namespaced BoldDB storage

func NewNS

func NewNS() *NSStorage

NewNS creates and returns a storage

func (*NSStorage) GetNS

func (s *NSStorage) GetNS(ns, key []byte) ([]byte, error)

GetNS finds a given bucket and key in db, and returns its value

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

Jump to

Keyboard shortcuts

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