Documentation
¶
Index ¶
- func ConnectDatabase(username, password, host, port, database, charset, logLevel string) (*gorm.DB, error)
- func GetRedisContext() context.Context
- func IfTxIsNullGetDB(tx *gorm.DB, ado *gorm.DB) *gorm.DB
- func InitRedis(cfg RedisConfig) *redis.Client
- func IsErrRecordNotFound(err error) bool
- func IsRealError(err error) bool
- func IsRedisRealError(err error) bool
- func WithContext(c context.Context) context.Context
- type RedisConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectDatabase ¶
func ConnectDatabase(username, password, host, port, database, charset, logLevel string) (*gorm.DB, error)
ConnectDatabase 连接数据库
func GetRedisContext ¶
func IfTxIsNullGetDB ¶
IfTxIsNullGetDB 创建事务
Types ¶
Click to show internal directories.
Click to hide internal directories.