Documentation ¶
Overview ¶
Simplebolt provides a simple way to use Bolt. Similar to simpleredis.
Index ¶
- Constants
- Variables
- type BoltCreator
- type Database
- type HashMap
- func (h *HashMap) Clear() error
- func (h *HashMap) Del(elementid string) error
- func (h *HashMap) DelKey(elementid, key string) error
- func (h *HashMap) Exists(elementid string) (found bool, err error)
- func (h *HashMap) Get(elementid, key string) (val string, err error)
- func (h *HashMap) GetAll() (results []string, err error)
- func (h *HashMap) Has(elementid, key string) (found bool, err error)
- func (h *HashMap) Remove() error
- func (h *HashMap) Set(elementid, key, value string) (err error)
- type KeyValue
- type List
- type Set
Constants ¶
View Source
const (
// Version number. Stable API within major version numbers.
Version = 3.0
)
Variables ¶
View Source
var ( ErrBucketNotFound = errors.New("Bucket not found") ErrKeyNotFound = errors.New("Key not found") ErrDoesNotExist = errors.New("Does not exist") ErrFoundIt = errors.New("Found it") ErrExistsInSet = errors.New("Element already exists in set") ErrInvalidID = errors.New("Element ID can not contain \":\"") )
Functions ¶
This section is empty.
Types ¶
type BoltCreator ¶
type BoltCreator struct {
// contains filtered or unexported fields
}
func NewCreator ¶
func NewCreator(db *Database) *BoltCreator
func (*BoltCreator) NewHashMap ¶
func (b *BoltCreator) NewHashMap(id string) (pinterface.IHashMap, error)
func (*BoltCreator) NewKeyValue ¶
func (b *BoltCreator) NewKeyValue(id string) (pinterface.IKeyValue, error)
func (*BoltCreator) NewList ¶
func (b *BoltCreator) NewList(id string) (pinterface.IList, error)
func (*BoltCreator) NewSet ¶
func (b *BoltCreator) NewSet(id string) (pinterface.ISet, error)
type HashMap ¶
type HashMap boltBucket
func (*HashMap) DelKey ¶
Remove a key for an entry in a hashmap (for instance the email field for a user)
func (*HashMap) Get ¶
Get a value from a hashmap given the element id (for instance a user id) and the key (for instance "password")
type KeyValue ¶
type KeyValue boltBucket
func NewKeyValue ¶
Create a new key/value if it does not already exist
type List ¶
type List boltBucket
The wrapped datatypes
Click to show internal directories.
Click to hide internal directories.