mongoUtils

package module
v0.0.0-...-bc541f4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectOrDie

func ConnectOrDie(m MongoConfig, connectDirect bool) (a *mongo.Database, b *mongo.Client)

func ConnectOrFail

func ConnectOrFail(m MongoConfig, connectDirect bool) (a *mongo.Database, b *mongo.Client, err error)

Types

type MongoConfig

type MongoConfig struct {
	Db       string
	User     string
	Password string
	URI      string
}

type MongoWriter

type MongoWriter struct {
	DB *mongo.Database
}

func (*MongoWriter) Write

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

Jump to

Keyboard shortcuts

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