Documentation
¶
Index ¶
- func CreateBeforeHook(gormDB *gorm.DB)
- func GetOneMysqlClient(sqlName string) (*gorm.DB, error)
- func GetSqlDriver(sqlType string, sqlName string, readDbIsOpen int, dbConf ...ConfigParams) (*gorm.DB, error)
- func MaskNotDataError(gormDB *gorm.DB)
- func UpdateBeforeHook(gormDB *gorm.DB)
- type ConfigParams
- type ConfigParamsDetail
- type OptionFunc
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBeforeHook ¶
func GetOneMysqlClient ¶
GetOneMysqlClient 获取一个 mysql 客户端
func GetSqlDriver ¶
func GetSqlDriver(sqlType string, sqlName string, readDbIsOpen int, dbConf ...ConfigParams) (*gorm.DB, error)
GetSqlDriver 获取数据库驱动, 可以通过options 动态参数连接任意多个数据库
func MaskNotDataError ¶
func UpdateBeforeHook ¶
Types ¶
type ConfigParams ¶
type ConfigParams struct { Write ConfigParamsDetail Read ConfigParamsDetail }
type ConfigParamsDetail ¶
type OptionFunc ¶
type OptionFunc func(log *loggerc)
type Options ¶
type Options interface {
// contains filtered or unexported methods
}
Options 尝试从外部重写内部相关的格式化变量
func SetErrStrFormat ¶
func SetInfoStrFormat ¶
SetInfoStrFormat 定义 6 个函数修改内部变量
func SetTracErrStrFormat ¶
func SetTracWarnStrFormat ¶
func SetTraceStrFormat ¶
func SetWarnStrFormat ¶
Click to show internal directories.
Click to hide internal directories.