mongodb

package module
v0.0.0-...-38bef87 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: MIT Imports: 6 Imported by: 0

README

mongoclient

a simpler interface to mongodb

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoConn

type MongoConn struct {
	// contains filtered or unexported fields
}

MongoConn db connection

func NewMongoConn

func NewMongoConn(URI string, database string, colName string) (*MongoConn, error)

func (*MongoConn) Delete

func (db *MongoConn) Delete(filt map[string]interface{}) error

func (*MongoConn) Disconnect

func (db *MongoConn) Disconnect() error

Disconnect from db connection

func (*MongoConn) GetAllDocuments

func (db *MongoConn) GetAllDocuments() ([]map[string]interface{}, error)

func (*MongoConn) InsertNewDocument

func (db *MongoConn) InsertNewDocument(intf interface{}) error

Jump to

Keyboard shortcuts

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