Tested with mysql, added simple fig file, need to write a more substantial fig setup

This commit is contained in:
Torkel Ödegaard
2015-01-07 14:05:57 +01:00
parent 1ae52d2472
commit 9d629f2780
4 changed files with 12 additions and 54 deletions
+3
View File
@@ -10,6 +10,7 @@ import (
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/torkelo/grafana-pro/pkg/setting"
_ "github.com/go-sql-driver/mysql"
"github.com/go-xorm/xorm"
_ "github.com/mattn/go-sqlite3"
)
@@ -112,6 +113,8 @@ func getEngine() (*xorm.Engine, error) {
return nil, fmt.Errorf("Unknown database type: %s", DbCfg.Type)
}
log.Info("Database: %v, ConnectionString: %v", DbCfg.Type, cnnstr)
return xorm.NewEngine(DbCfg.Type, cnnstr)
}