feat: 更新 Drriver Tag

This commit is contained in:
2025-09-08 09:39:56 +08:00
parent aca5c2e5b3
commit 34701459c6

View File

@ -42,8 +42,8 @@ type CfgFile struct {
//
// Date : 15:19 2022/6/9
type Database struct {
Master *Driver `json:"master" yaml:"master"` // 主库配置
Slave *Driver `json:"slave" yaml:"slave"` // 从库配置
Master *Driver `json:"master" yaml:"master" toml:"master" ini:"master"` // 主库配置
Slave *Driver `json:"slave" yaml:"slave" toml:"slave" ini:"slave"` // 从库配置
}
// Driver ...
@ -52,15 +52,15 @@ type Database struct {
//
// Date : 18:44 2022/5/14
type Driver struct {
DBType string `json:"db_type" yaml:"db_type"` // 数据库驱动类型
Host string `json:"host" yaml:"host"` // 数据库地址
Port int `json:"port" yaml:"port"` // 数据库端口
Username string `json:"username" yaml:"username"` // 用户名
Password string `json:"password" yaml:"password"` // 密码
Database string `json:"database" yaml:"database"` // 数据库
Charset string `json:"charset" yaml:"charset"` // 数据库编码
Connection *Connection `json:"connection" yaml:"connection"` // 连接配置
Timezone string `json:"timezone" yaml:"timezone"` // 时区
DBType string `json:"db_type" yaml:"db_type" toml:"db_type" ini:"db_type"` // 数据库驱动类型
Host string `json:"host" yaml:"host" toml:"host" ini:"host"` // 数据库地址
Port int `json:"port" yaml:"port" toml:"port" ini:"port"` // 数据库端口
Username string `json:"username" yaml:"username" toml:"username" ini:"username"` // 用户名
Password string `json:"password" yaml:"password" toml:"password" ini:"password"` // 密码
Database string `json:"database" yaml:"database" toml:"database" ini:"database"` // 数据库
Charset string `json:"charset" yaml:"charset" toml:"charset" ini:"charset"` // 数据库编码
Connection *Connection `json:"connection" yaml:"connection" toml:"connection" ini:"connection"` // 连接配置
Timezone string `json:"timezone" yaml:"timezone" toml:"timezone" ini:"timezone"` // 时区
}
// Connection 连接数配置
@ -69,8 +69,8 @@ type Driver struct {
//
// Date : 15:18 2022/6/9
type Connection struct {
MaxOpen int `json:"max_open" yaml:"max_open"` // 最大打开连接数
MaxIdle int `json:"max_idle" yaml:"max_idle"` // 最大的处理连接数
MaxOpen int `json:"max_open" yaml:"max_open" toml:"max_open" ini:"max_open"` // 最大打开连接数
MaxIdle int `json:"max_idle" yaml:"max_idle" toml:"max_idle" ini:"max_idle"` // 最大的处理连接数
}
// DescTableItem 表结构的描述