mongodb

package
v0.0.0-...-2be556a Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 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 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) (*mongo.Cursor, context.Context, error)

Find ...

func (*MongoDB) FindOne

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

FindOne ...

func (*MongoDB) GetOne

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

GetOne ...

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) (*mongo.Cursor, context.Context, error)
	FindOne(collection string, filter interface{}) (*mongo.SingleResult, error)
	GetOne(collection string, filter interface{}) (*mongo.SingleResult, 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