Versions in this module Expand all Collapse all v0 v0.0.2 Mar 5, 2020 Changes in this version + func AsResource(opts ...AsResourceOpt) internal.Resource + func CloseDbConnection() + func DbeEngine() *gorm.DB + func GormDb1() *gorm.DB + func OpenDbConnection() (err error) + func OpenDbConnectionWith(url string) (err error) + type AsResourceOpt func(r *asResource) + func WithConnectUri(driver string, uri string) AsResourceOpt + type DB struct + var DBE1 *DB + func Dbe() *DB + func New() *DB + func (db *DB) AddRoles(loginName string, roleNames []string) (err error) + func (db *DB) AddRolesFor(user *models.User, roleNames []string) (err error) + func (db *DB) Close() + func (db *DB) CloseX() (err error) + func (db *DB) Engine() *gorm.DB + func (db *DB) EnsureUserRole(loginName, roleName string) (err error) + func (db *DB) EnsureUserRoles(loginName string, roleNames []string) (err error) + func (db *DB) LoadRoles(r *models.User) (roles []*models.Role, err error) + func (db *DB) Open() (err error) + func (db *DB) OpenUrl(driver, url string) (err error) + func (db *DB) OpenX() (err error) + func (db *DB) OpenXUrl(driver, url string) (err error) + func (db *DB) RegisterModels(models ...interface{}) *DB + func (db *DB) UserDrop(loginName string) (err error) + func (db *DB) XormEngine() *xorm.Engine + type DatabaseConfig struct + ConnectionTimeout int64 + MaxIdleConns int + MaxOpenConns int + Name string + Password string + Url string + Username string + func InitDatabaseConfig() *DatabaseConfig + type GormLogger struct + func (*GormLogger) Print(v ...interface{})