From 34701459c6a9610b74f9e98d7bea63d3ca173c27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Mon, 8 Sep 2025 09:39:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=20Drriver=20Tag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- define/define.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/define/define.go b/define/define.go index 4f6007e..86404b8 100644 --- a/define/define.go +++ b/define/define.go @@ -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 表结构的描述