database

package
v0.0.0-...-9e3f5d0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DBWTimeout = 5000 //5 Seconds

DBWTimeout ... Milliseconds to wait for db server before timing out

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

Database ... Database model

func CreateDatabase

func CreateDatabase(uri string, dbName string) (*Database, error)

CreateDatabase ... Create single instance of the database

func (*Database) GetSession

func (database *Database) GetSession() (*mgo.Database, *mgo.Session)

GetSession ... Return the mongo db and session

Jump to

Keyboard shortcuts

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