Versions in this module Expand all Collapse all v1 v1.3.0 Jul 1, 2019 v1.2.0 Mar 17, 2018 Changes in this version + const DATABASE_DIR + const DBCONFIG_FILE + const DEFAULTDB_NAME + func Callback(fn func(*gorm.DB) error, session ...*gorm.DB) error + func CallbackByName(dbName string, fn func(*gorm.DB) error, session ...*gorm.DB) error + func DB(name ...string) (*gorm.DB, bool) + func List() map[string]*gorm.DB + func MustDB(name ...string) *gorm.DB + func TransactCallback(fn func(*gorm.DB) error, session ...*gorm.DB) (err error) + func TransactCallbackByName(dbName string, fn func(*gorm.DB) error, session ...*gorm.DB) (err error) + type DBConfig struct + Connstring string + Driver string + Enable bool + MaxIdleConns int + MaxOpenConns int + Name string + ShowSql bool + func Config(name ...string) (DBConfig, bool) + func MustConfig(name ...string) DBConfig + type DBService struct + Default *gorm.DB + List map[string]*gorm.DB