Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TableToStruct ¶
TableToStruct 将数据库表 转换为struct结构输出
Types ¶
type DbConf ¶
type DbConf struct { DBType string `yaml:"dbType"` //数据库类型 默认mysql UName string `yaml:"uName"` //唯一名称标识 Mark string `yaml:"mark"` //备注 Host string `yaml:"host"` //域名或ip User string `yaml:"user"` //用户 Pass string `yaml:"pass"` //密码 Port string `yaml:"port"` //端口 Name string `yaml:"name"` //数据库名称 LogLevel string `yaml:"logLevel"` //日志级别 [silent error warn info] SlowTime int `yaml:"slowTime"` //慢日志记录时间 单位毫秒 LogPrefix string `yaml:"logPrefix"` //日志前缀 默认前缀为 "[dbType]-" //ssh tunnel加密配置 TunnelSSHHost string `yaml:"tunnelSSHHost"` TunnelSSHPort string `yaml:"tunnelSSHPort"` TunnelSSHUser string `yaml:"tunnelSSHUser"` //ssh 密码验证 TunnelSSHPassword string `yaml:"tunnelSSHPassword"` // 秘钥验证 RSA PRIVATE KEY TunnelSSHKey string `yaml:"tunnelSSHKey"` // 秘钥生成时的密码 一般都没有 TunnelSSHPassphrase string `yaml:"tunnelSSHPassphrase"` //自定义连接名名称 TunnelSSHNetName string `yaml:"tunnelSSHNetName"` }
DbConf 数据库配置格式
type DbConfigParse ¶
type DbConfigParse struct {
Dbs []DbConf `yaml:"dbConfig"`
}
Click to show internal directories.
Click to hide internal directories.