Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hertz ¶
type Hertz struct { Host string `mapstructure:"host" json:"host" yaml:"host"` // Hertz服务器地址 Port string `mapstructure:"port" json:"port" yaml:"port"` // Hertz服务器端口 }
func (*Hertz) WithHostPorts ¶
type JWT ¶
type JWT struct { SigningKey string `mapstructure:"signing-key" json:"signing-key" yaml:"signing-key"` // jwt签名 ExpiresTime string `mapstructure:"expires-time" json:"expires-time" yaml:"expires-time"` // 过期时间 BufferTime string `mapstructure:"buffer-time" json:"buffer-time" yaml:"buffer-time"` // 缓冲时间 Issuer string `mapstructure:"issuer" json:"issuer" yaml:"issuer"` // 签发者 }
type MySQL ¶
type MySQL struct { Host string `mapstructure:"host" json:"host" yaml:"host"` // 数据库地址 Port string `mapstructure:"port" json:"port" yaml:"port"` // 数据库端口 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"` // 数据库连接密码 Config string `mapstructure:"config" json:"config" yaml:"config"` // DSN配置信息 }
func (*MySQL) DSN ¶
*
- DSN 使用`strings.Builder`拼接DSN(data source name)字符串
- 关于DSN更多信息请参考: https://github.com/go-sql-driver/mysql#dsn-data-source-name
- @Author: [linzijie](linzijie1998@126.com)
type Redis ¶
type Zap ¶
type Zap struct { Level string `mapstructure:"level" json:"level" yaml:"level"` // 级别 Prefix string `mapstructure:"prefix" json:"prefix" yaml:"prefix"` // 日志前缀 Format string `mapstructure:"format" json:"format" yaml:"format"` // 输出 Director string `mapstructure:"director" json:"director" yaml:"director"` // 日志文件夹 EncodeLevel string `mapstructure:"encode-level" json:"encode-level" yaml:"encode-level"` // 编码级 StacktraceKey string `mapstructure:"stacktrace-key" json:"stacktrace-key" yaml:"stacktrace-key"` // 栈名 MaxAge int `mapstructure:"max-age" json:"max-age" yaml:"max-age"` // 日志留存时间 ShowLine bool `mapstructure:"show-line" json:"show-line" yaml:"show-line"` // 显示行 LogInConsole bool `mapstructure:"log-in-console" json:"log-in-console" yaml:"log-in-console"` // 输出控制台 }
func (*Zap) TransportLevel ¶
TransportLevel 根据字符串转化为 zapcore.Level Author [SliverHorn](https://github.com/SliverHorn)
func (*Zap) ZapEncodeLevel ¶
func (z *Zap) ZapEncodeLevel() zapcore.LevelEncoder
ZapEncodeLevel 根据 EncodeLevel 返回 zapcore.LevelEncoder Author [SliverHorn](https://github.com/SliverHorn)
Click to show internal directories.
Click to hide internal directories.