Documentation ¶
Index ¶
- Variables
- func DBFile() string
- func GetDB(dbname consts.TenantId) *gorm.DB
- func GetDBResolver() *SaasDBresolver.DBResolver
- func GetSaasDB(dbName consts.TenantId) *gorm.DB
- func GormMySQL(m config.Mysql) *gorm.DB
- func GormSQLLite() *gorm.DB
- func InitSaasDBHandler(dbName consts.TenantId) (db *gorm.DB, err error)
- func MysqlTables(db *gorm.DB)
- func New(writer writer, config serverConfig) logger.Interface
- func PaginateScope(page, pageSize int, sort, orderBy string) func(db *gorm.DB) *gorm.DB
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Discard = New(log.New(ioutil.Discard, "", log.LstdFlags), serverConfig{}) Default = New(log.New(os.Stdout, "\r\n", log.LstdFlags), serverConfig{ SlowThreshold: 200 * time.Millisecond, LogLevel: logger.Warn, Colorful: true, }) Recorder = traceRecorder{Interface: Default, BeginAt: time.Now()} )
Functions ¶
func GetDBResolver ¶
func GetDBResolver() *SaasDBresolver.DBResolver
func GormSQLLite ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.