Beispiel #1
0
func InitializeDb() error {
	if mgr, err := dbprovider.InitDbProvider("mongodbprovider", ""); err != nil {
		logger.Get().Error("Error Initializing the Db Provider: %s", err)
		return err
	} else {
		DbManager = mgr
	}
	if err := DbManager.InitDb(); err != nil {
		logger.Get().Error("Error Initializing the DAOs. Error: %s", err)
		return err
	}
	return nil
}
Beispiel #2
0
func initializeDb(authCfg conf.AppDBConfig) error {

	if mgr, err := dbprovider.InitDbProvider("mongodbprovider", ""); err != nil {
		logger.Get().Error("Error Initializing the Db Provider: %s", err)
		return err
	} else {
		DbManager = mgr
	}

	if err := DbManager.InitDb(); err != nil {
		logger.Get().Error("Error Initializing the Collections: %s", err)
		return err
	}
	return nil
}