Documentation
¶
Overview ¶
Package service contains all the services necessary for interacting with all the collections(tables) in the database.
Each service file should be written in it's own file and should represent only one dbmodels
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoIDSpecified says that no ID was specified for a fetch operation ErrNoIDSpecified = errors.New("No Id was specified for the entity") )
Functions ¶
func Connect ¶
func Connect(collectionName string) (*mgo.Session, *mgo.Collection)
Connect creates the connection to the database. To avoid forgetting to close the session, always write: *defer session.Close()* right after getting it through this method
func InitDbService ¶
func InitDbService()
InitDbService initializes the connection (known as session) parameters to the database
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.