Documentation ¶
Index ¶
- Constants
- func NewDBHelper(conf *config.EngineConfig, opts ...ConfigOption) (helper ugorm.DBHelper, err error)
- func NewLogger(log *zap.Logger, conf *config.OrmLogConfig, optHooks ...ugorm.Hook) logger.Interface
- func NewLoggerInterface(writer Writer, config logger.Config) logger.Interface
- func ParserLevel(lev string) (level logger.LogLevel)
- type ConfigOption
- type Writer
Constants ¶
View Source
const ( Reset = logger.Reset Red = logger.Red Green = logger.Green Yellow = logger.Yellow Blue = logger.Blue Magenta = logger.Magenta Cyan = logger.Cyan White = logger.White BlueBold = logger.BlueBold MagentaBold = logger.MagentaBold RedBold = logger.RedBold YellowBold = logger.YellowBold )
Colors
Variables ¶
This section is empty.
Functions ¶
func NewDBHelper ¶
func NewDBHelper(conf *config.EngineConfig, opts ...ConfigOption) (helper ugorm.DBHelper, err error)
func NewLoggerInterface ¶
func ParserLevel ¶
ParserLevel 从字符串中解析 gorm 的日志等级 默认值为 info
Types ¶
type ConfigOption ¶
func WithLogger ¶
func WithLogger(l logger.Interface) ConfigOption
func WithName ¶
func WithName(strategy schema.Namer) ConfigOption
func WithSingularTable ¶
func WithSingularTable() ConfigOption
Click to show internal directories.
Click to hide internal directories.