aboutsummaryrefslogblamecommitdiff
path: root/appservice/db.go
blob: 2c713125d351eda1e214902dad0e66eb92c902a6 (plain) (tree)




















                                                         
package appservice

import (
	"github.com/jinzhu/gorm"
	_ "github.com/jinzhu/gorm/dialects/mysql"
	_ "github.com/jinzhu/gorm/dialects/postgres"
	_ "github.com/jinzhu/gorm/dialects/sqlite"
)

var db *gorm.DB

func InitDb() error {
	var err error

	db, err = gorm.Open(config.DbType, config.DbPath)
	if err != nil {
		return err
	}

	return nil
}