mongodb

package
v0.0.0-...-8954c2e Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoDB

type MongoDB struct{}

MongoDB ...

func MongoDBHandler

func MongoDBHandler() *MongoDB

MongoDBHandler ...

func (*MongoDB) Delete

func (mongolib *MongoDB) Delete(collection string, filter interface{}) (*mongo.DeleteResult, error)

Delete ..

func (*MongoDB) Edit

func (mongolib *MongoDB) Edit(collection string, filter, data interface{}) (*mongo.UpdateResult, error)

Edit ...

func (*MongoDB) Find

func (mongolib *MongoDB) Find(collection string, filter interface{}) (*mongo.Cursor, context.Context, error)

Find ...

func (*MongoDB) InsertMany

func (mongolib *MongoDB) InsertMany(collection string, data []interface{}) (*mongo.InsertManyResult, error)

InsertMany ...

func (*MongoDB) InsertOne

func (mongolib *MongoDB) InsertOne(collection string, data interface{}) (*mongo.InsertOneResult, error)

InsertOne ...

type MongoDBInterface

type MongoDBInterface interface {
	InsertOne(collection string, data interface{}) (*mongo.InsertOneResult, error)
	InsertMany(collection string, data []interface{}) (*mongo.InsertManyResult, error)
	Find(collection string, filter interface{}) (*mongo.Cursor, context.Context, error)
	Delete(collection string, filter interface{}) (*mongo.DeleteResult, error)
	Edit(collection string, filter, data interface{}) (*mongo.UpdateResult, error)
}

MongoDBInterface ...

Jump to

Keyboard shortcuts

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