database

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MongoDatabaseName = utils.GetCloudProjectID()

MongoDatabaseName is the name of the database in MongoDB

Functions

func Set

func Set(db *Database)

Set the database object to use

Types

type Database

type Database struct {
	Mdb *mongo.Database

	apis.APIs
}

Database interface abstracts database operations

func Get

func Get() *Database

Get the database object to use

func New

func New() (*Database, error)

New returns a new database object that connects to the real database

func NewWithDb

func NewWithDb(mdb *mongo.Database) *Database

NewWithDb returns a new database object with the given Mongo database

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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