mock

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func CreateDB

func CreateDB() *DB

func (*DB) Close

func (d *DB) Close(ctx context.Context) error

func (*DB) Delete

func (d *DB) Delete(collection string, filter *db.Filter) error

func (*DB) FindAll

func (d *DB) FindAll(collection string, slice interface{}, filter *db.Filter, opts *db.Options) error

func (*DB) FindOne

func (d *DB) FindOne(collection string, object interface{}, filter *db.Filter, opts *db.Options) error

func (*DB) Insert

func (d *DB) Insert(collection string, object interface{}) error

func (*DB) Open

func (d *DB) Open(ctx context.Context) error

func (*DB) Search

func (d *DB) Search(collection string, search string, fields []string, slice interface{}) error

func (*DB) Update

func (d *DB) Update(collection string, object interface{}, filter *db.Filter) error

func (*DB) Upsert

func (d *DB) Upsert(collection string, object interface{}, filter *db.Filter) error

Jump to

Keyboard shortcuts

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