db

package
v0.0.0-...-46f008b Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfig

func GetConfig() *mgo.DialInfo

GetConfig - Get the connection configuration for the db

returns -- {*.mgo.DialInfo} Dial information for a connection

func GetConnection

func GetConnection(prods ...bool) (*mgo.Session, error)

GetConnection - Get the connection (session object) singleton

params -- prods {bool} Optional production env config usage

returns -- {*mgo.Session} The session -- {error}

func GetDB

func GetDB(prods ...bool) (*mgo.Database, error)

GetDB - Get the database instance

params -- prods {bool} Optional parameter

returns -- {*mgo.Database} Database instance -- {error}

func GetProdConfig

func GetProdConfig() *mgo.DialInfo

Types

This section is empty.

Jump to

Keyboard shortcuts

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