boltdb

package
v0.0.0-...-0085f51 Latest Latest
Warning

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

Go to latest
Published: May 17, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBoltDB

func NewBoltDB(conf *config.Configuration) (storage.Backend, error)

NewBoltDB opens a new BoltDB connection to the specified path and bucket

Types

type BoltDB

type BoltDB struct {
	*bolt.DB
	BucketName string
	Path       string
}

BoltDB is the Boltdb backend.

func (*BoltDB) Create

func (db *BoltDB) Create() error

Create intialize the storage backend

func (*BoltDB) Delete

func (db *BoltDB) Delete(key []byte) error

Delete the value at the specified key

func (*BoltDB) Destroy

func (db *BoltDB) Destroy() error

Destroy remove the storage backend bucket

func (*BoltDB) Get

func (db *BoltDB) Get(key []byte) ([]byte, error)

Get a value given its key

func (*BoltDB) List

func (db *BoltDB) List() ([]string, error)

List returns all secrets

func (*BoltDB) Name

func (db *BoltDB) Name() string

Name returns BoltDB label

func (*BoltDB) Put

func (db *BoltDB) Put(key []byte, value []byte) error

Put a value at the specified key

Jump to

Keyboard shortcuts

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