Documentation
¶
Index ¶
- func CloseDbConnection()
- func GormDb() *gorm.DB
- func OpenDbConnection() (err error)
- type 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() *xorm.Engine
- 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) UserDrop(loginName string) (err error)
- type GormLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseDbConnection ¶
func CloseDbConnection()
func OpenDbConnection ¶
func OpenDbConnection() (err error)
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
var DBE *DB
func (*DB) AddRolesFor ¶
func (*DB) EnsureUserRole ¶
func (*DB) EnsureUserRoles ¶
type GormLogger ¶
type GormLogger struct{}
func (*GormLogger) Print ¶
func (*GormLogger) Print(v ...interface{})
Click to show internal directories.
Click to hide internal directories.