keystore

package module
v0.0.0-...-5801467 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2020 License: MIT Imports: 7 Imported by: 0

README

keystore

Keystore written in GoLang. Wrapper around BBolt

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BucketErrNotExist = errors.New("Bucket does not exist")
View Source
var KeyErrNotExist = errors.New("Key does not exist")

Functions

This section is empty.

Types

type KeyStore

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

func New

func New(filename string) (*KeyStore, error)

func (*KeyStore) Close

func (self *KeyStore) Close() error

Close database connection and remove file lock

func (*KeyStore) Get

func (self *KeyStore) Get(bucket string, key string, value interface{}) (err error)

Get will return interface from specified bucket with specified key. returns error if there is no key

func (*KeyStore) Set

func (self *KeyStore) Set(bucket string, key string, value interface{}) (err error)

Set will Marshal the value and insert it into the bucket with specified key

Jump to

Keyboard shortcuts

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