@@ -17,28 +17,28 @@ import (
17
17
)
18
18
19
19
type Config struct {
20
- Type string `json:"type,omitempty"`
21
- Host string `json:"host,omitempty"`
22
- Port int `json:"port,omitempty"`
23
- Database string `json:"database,omitempty"`
24
- DbName string `json:"dbName,omitempty"`
25
- Username string `json:"username,omitempty"`
26
- Password string `json:"password,omitempty"`
27
- OdbcDsn string `json:"odbcDsn,omitempty"`
28
- OdbcDialectName string `json:"odbcDialectName,omitempty"`
29
-
30
- Schema string `json:"schema,omitempty"`
31
- Sid string `json:"sid,omitempty"`
32
- MaxIdleConn int `json:"maxIdleConn,omitempty"`
33
- MaxOpenConn int `json:"maxOpenConn,omitempty"`
34
- DatabasePath string `json:"databasePath,omitempty"`
20
+ Type string `json:"type,omitempty" yaml:"type,omitempty" `
21
+ Host string `json:"host,omitempty" yaml:"host,omitempty" `
22
+ Port int `json:"port,omitempty" yaml:"port,omitempty" `
23
+ Database string `json:"database,omitempty" yaml:"database,omitempty" `
24
+ DbName string `json:"dbName,omitempty" yaml:"dbName,omitempty" `
25
+ Username string `json:"username,omitempty" yaml:"username,omitempty" `
26
+ Password string `json:"password,omitempty" yaml:"password,omitempty" `
27
+ OdbcDsn string `json:"odbcDsn,omitempty" yaml:"odbcDsn,omitempty" `
28
+ OdbcDialectName string `json:"odbcDialectName,omitempty" yaml:"odbcDialectName,omitempty" `
29
+
30
+ Schema string `json:"schema,omitempty" yaml:"schema,omitempty" `
31
+ Sid string `json:"sid,omitempty" yaml:"sid,omitempty" `
32
+ MaxIdleConn int `json:"maxIdleConn,omitempty" yaml:"maxIdleConn,omitempty" `
33
+ MaxOpenConn int `json:"maxOpenConn,omitempty" yaml:"maxOpenConn,omitempty" `
34
+ DatabasePath string `json:"databasePath,omitempty" yaml:"databasePath,omitempty" `
35
35
SSHClient * ssh.Client `json:"-"`
36
- Dsn string `json:"dsn,omitempty"`
36
+ Dsn string `json:"dsn,omitempty" yaml:"dsn,omitempty" `
37
37
38
- TlsConfig string `json:"tlsConfig,omitempty"`
39
- TlsRootCert string `json:"tlsRootCert,omitempty"`
40
- TlsClientCert string `json:"tlsClientCert,omitempty"`
41
- TlsClientKey string `json:"tlsClientKey,omitempty"`
38
+ TlsConfig string `json:"tlsConfig,omitempty" yaml:"tlsConfig,omitempty" `
39
+ TlsRootCert string `json:"tlsRootCert,omitempty" yaml:"tlsRootCert,omitempty" `
40
+ TlsClientCert string `json:"tlsClientCert,omitempty" yaml:"tlsClientCert,omitempty" `
41
+ TlsClientKey string `json:"tlsClientKey,omitempty" yaml:"tlsClientKey,omitempty" `
42
42
}
43
43
44
44
// New 创建 db客户端
0 commit comments