Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Discard = New(log.New(ioutil.Discard, "", log.LstdFlags), config{}) Default = New(log.New(os.Stdout, "\r\n", log.LstdFlags), config{ SlowThreshold: 200 * time.Millisecond, LogLevel: logger.Warn, Colorful: true, }) Recorder = traceRecorder{Interface: Default, BeginAt: time.Now()} )
View Source
var CONFIG = Mysql{ Path: "127.0.0.1:3306", Config: "charset=utf8mb4&parseTime=True&loc=Local", DbName: "iris-admin", Username: "root", Password: "", MaxIdleConns: 0, MaxOpenConns: 0, LogMode: false, LogZap: "error", }
View Source
var ErrDatabaseInit = errors.New("database initialize fail")
Functions ¶
Types ¶
type Mysql ¶
type Mysql struct { Path string `mapstructure:"path" json:"path" yaml:"path"` Config string `mapstructure:"config" json:"config" yaml:"config"` DbName string `mapstructure:"db-name" json:"db-name" yaml:"db-name"` Username string `mapstructure:"username" json:"username" yaml:"username"` Password string `mapstructure:"password" json:"password" yaml:"password"` MaxIdleConns int `mapstructure:"max-idle-conns" json:"max-idle-conns" yaml:"max-idle-conns"` MaxOpenConns int `mapstructure:"max-open-conns" json:"max-open-conns" yaml:"max-open-conns"` LogMode bool `mapstructure:"log-mode" json:"log-mode" yaml:"log-mode"` LogZap string `mapstructure:"log-zap" json:"log-zap" yaml:"log-zap"` //silent,error,warn,info,zap }
Click to show internal directories.
Click to hide internal directories.