mock

package
v0.0.0-...-0ac9ed0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

type Collection struct {
	mock.Mock
	DefaultSingleResult mongodb.ISingleResult
	DefaultCursor       mongodb.ICursor
}

func (Collection) DeleteOne

func (m Collection) DeleteOne(a0 context.Context, a1 interface{}) (int64, error)

func (Collection) Find

func (m Collection) Find(a0 context.Context, a1 interface{}, a2 ...*options.FindOptions) (mongodb.ICursor, error)

func (Collection) FindOne

func (m Collection) FindOne(a0 context.Context, a1 interface{}, a2 ...*options.FindOneOptions) mongodb.ISingleResult

func (Collection) InsertOne

func (m Collection) InsertOne(a0 context.Context, a1 interface{}) (interface{}, error)

func (Collection) UpdateOne

func (m Collection) UpdateOne(a0 context.Context, a1 interface{}, a2 interface{}) (interface{}, error)

type Cursor

type Cursor struct {
	Res []interface{}
	// contains filtered or unexported fields
}

func (Cursor) Decode

func (m Cursor) Decode(out interface{}) error

func (*Cursor) Next

func (m *Cursor) Next(ctx context.Context) bool

type DB

type DB struct {
	mock.Mock
}

func (DB) Close

func (b DB) Close(ctx context.Context) error

func (DB) Collection

func (m DB) Collection(a0 string, a1 ...*options.CollectionOptions) mongodb.ICollection

type SingleResult

type SingleResult struct {
	Entity interface{}
	Err    error
}

func (SingleResult) Decode

func (m SingleResult) Decode(out interface{}) error

Jump to

Keyboard shortcuts

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