mongoutils

package module
v0.0.0-...-1b44452 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Aggregate

func Aggregate(collName string, db *mongo.Database, pipeline mongo.Pipeline) error

Aggregate func

func ConnectToMongo

func ConnectToMongo(m MongoURI, connectDirect bool) (a *mongo.Database, b *mongo.Client)

ConnectToMongo func

Types

type MongoURI

type MongoURI struct {
	Db       string
	User     string
	Password string
	Cluster  string
}

MongoURI struct for connection

type MongoWriter

type MongoWriter struct {
	DB *mongo.Database
}

MongoWriter implementing io.Writer interface

func (*MongoWriter) Write

func (writer *MongoWriter) Write(p []byte) (n int, err error)

Write func for logger

Jump to

Keyboard shortcuts

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