Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Duramap ¶
Duramap is a map of strings to ambiguous data structures, which is protected by a Read/Write mutex and backed by a bbolt database
func NewDuramap ¶
func NewDuramap(path, name string, secret EncryptionSecret) (*Duramap, error)
NewDuramap returns a new Duramap backed by a bbolt database located at `path`
func (*Duramap) DoWithMap ¶
func (dm *Duramap) DoWithMap(f func(m GenericMap))
DoWithMap is like `WithMap` but does not return a result
func (*Duramap) UpdateMap ¶
UpdateMap is like `DoWithMap` but the result of `f` is re-saved afterwards
func (*Duramap) WithMap ¶
func (dm *Duramap) WithMap(f func(m GenericMap) interface{}) interface{}
WithMap returns the result of calling `f` with the internal map
type EncryptionSecret ¶
type EncryptionSecret = *[32]byte
EncryptionSecret is a 32-byte secret key used to encrypt data with the Secretbox construction
type GenericMap ¶
type GenericMap = map[string]interface{}
GenericMap is a map of strings to empty interfaces
type Tx ¶
type Tx struct {
M *GenericMap
// contains filtered or unexported fields
}
Tx is a transaction that operates on a Duramap. It has a reference to the internal map.