Versions in this module Expand all Collapse all v1 v1.4.1 Jan 25, 2018 Changes in this version + var ErrBatchUnsupported = errors.New("this datastore does not support batching") + var ErrInvalidType = errors.New("datastore: invalid type error") + var ErrNotFound = errors.New("datastore: key not found") + func GetBackedHas(ds Datastore, key Key) (bool, error) + func NamespaceType(namespace string) string + func NamespaceValue(namespace string) string + type Batch interface + Commit func() error + Delete func(key Key) error + Put func(key Key, val interface{}) error + func NewBasicBatch(ds Datastore) Batch + type Batching interface + Batch func() (Batch, error) + type CheckedDatastore interface + Check func() error + type Datastore interface + Delete func(key Key) error + Get func(key Key) (value interface{}, err error) + Has func(key Key) (exists bool, err error) + Put func(key Key, value interface{}) error + Query func(q query.Query) (query.Results, error) + type GCDatastore interface + CollectGarbage func() error + type Key struct + func EntryKeys(e []dsq.Entry) []Key + func KeyWithNamespaces(ns []string) Key + func NewKey(s string) Key + func RandomKey() Key + func RawKey(s string) Key + func (k *Key) Clean() + func (k *Key) UnmarshalJSON(data []byte) error + func (k Key) BaseNamespace() string + func (k Key) Bytes() []byte + func (k Key) Child(k2 Key) Key + func (k Key) ChildString(s string) Key + func (k Key) Equal(k2 Key) bool + func (k Key) Instance(s string) Key + func (k Key) IsAncestorOf(other Key) bool + func (k Key) IsDescendantOf(other Key) bool + func (k Key) IsTopLevel() bool + func (k Key) Less(k2 Key) bool + func (k Key) List() []string + func (k Key) MarshalJSON() ([]byte, error) + func (k Key) Name() string + func (k Key) Namespaces() []string + func (k Key) Parent() Key + func (k Key) Path() Key + func (k Key) Reverse() Key + func (k Key) String() string + func (k Key) Type() string + type KeySlice []Key + func (p KeySlice) Len() int + func (p KeySlice) Less(i, j int) bool + func (p KeySlice) Swap(i, j int) + type LogBatch struct + Name string + func (d *LogBatch) Commit() (err error) + func (d *LogBatch) Delete(key Key) (err error) + func (d *LogBatch) Put(key Key, value interface{}) (err error) + type LogDatastore struct + Name string + func NewLogDatastore(ds Datastore, name string) *LogDatastore + func (d *LogDatastore) Batch() (Batch, error) + func (d *LogDatastore) Check() error + func (d *LogDatastore) Children() []Datastore + func (d *LogDatastore) Close() error + func (d *LogDatastore) CollectGarbage() error + func (d *LogDatastore) Delete(key Key) (err error) + func (d *LogDatastore) Get(key Key) (value interface{}, err error) + func (d *LogDatastore) Has(key Key) (exists bool, err error) + func (d *LogDatastore) Put(key Key, value interface{}) (err error) + func (d *LogDatastore) Query(q dsq.Query) (dsq.Results, error) + func (d *LogDatastore) Scrub() error + type MapDatastore struct + func NewMapDatastore() (d *MapDatastore) + func (d *MapDatastore) Batch() (Batch, error) + func (d *MapDatastore) Close() error + func (d *MapDatastore) Delete(key Key) (err error) + func (d *MapDatastore) Get(key Key) (value interface{}, err error) + func (d *MapDatastore) Has(key Key) (exists bool, err error) + func (d *MapDatastore) Put(key Key, value interface{}) (err error) + func (d *MapDatastore) Query(q dsq.Query) (dsq.Results, error) + type NullDatastore struct + func NewNullDatastore() *NullDatastore + func (d *NullDatastore) Batch() (Batch, error) + func (d *NullDatastore) Close() error + func (d *NullDatastore) Delete(key Key) (err error) + func (d *NullDatastore) Get(key Key) (value interface{}, err error) + func (d *NullDatastore) Has(key Key) (exists bool, err error) + func (d *NullDatastore) Put(key Key, value interface{}) (err error) + func (d *NullDatastore) Query(q dsq.Query) (dsq.Results, error) + type ScrubbedDatastore interface + Scrub func() error + type Shim interface + Children func() []Datastore + type ThreadSafeDatastore interface + IsThreadSafe func()