Documentation
¶
Index ¶
- func New() data.Datastore
- type Collection
- type Datastore
- func (db *Datastore) Close()
- func (db *Datastore) Delete(collection string, object data.Object, comment string) *derp.Error
- func (db *Datastore) List(collection string, filter data.Expression, sort []string) (data.Iterator, *derp.Error)
- func (db *Datastore) Load(collection string, filter data.Expression, target data.Object) *derp.Error
- func (db *Datastore) Save(collection string, object data.Object, comment string) *derp.Error
- func (db *Datastore) Session(ctx context.Context) data.Session
- type Iterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Datastore ¶
type Datastore map[string]Collection
Datastore is a mock database
func (*Datastore) Close ¶ added in v0.2.1
func (db *Datastore) Close()
Close cleans up any remaining data created by the mock session.
func (*Datastore) List ¶ added in v0.2.5
func (db *Datastore) List(collection string, filter data.Expression, sort []string) (data.Iterator, *derp.Error)
List retrieves a group of records as an Iterator.
func (*Datastore) Load ¶
func (db *Datastore) Load(collection string, filter data.Expression, target data.Object) *derp.Error
Load retrieves a single record from the mock collection.
type Iterator ¶ added in v0.2.5
func NewIterator ¶ added in v0.2.5
Click to show internal directories.
Click to hide internal directories.