liuhaijun e94826ce29 add server
Change-Id: I0760f17f6a01c0121b59fcbfafc666032dbc30af
2024-09-19 09:44:15 +00:00

38 lines
1.0 KiB
Go

package config
type PostgreSqlConfig struct {
Host string `ini:"host" yaml:"host"`
Username string `ini:"username" yaml:"username"`
Password string `ini:"password" yaml:"password"`
Port uint16 `ini:"port" yaml:"port"`
Database string `ini:"database" yaml:"database"`
TablePrefix string `ini:"table_prefix" yaml:"table_prefix" mapstructure:"table_prefix"`
LogLevel int `ini:"log_level" yaml:"log_level" mapstructure:"log_level"`
PrintSql bool `ini:"print_sql" yaml:"print_sql" mapstructure:"print_sql"`
}
type PostgreSqlConfigMap map[string]PostgreSqlConfig
var PostgreSql = PostgreSqlConfigMap{
"data": {
Host: "127.0.0.1",
Username: "root",
Password: "root1234",
Port: 3306,
Database: "test",
TablePrefix: "",
LogLevel: 4,
PrintSql: false,
},
"auth": {
Host: "127.0.0.1",
Username: "root",
Password: "root1234",
Port: 3306,
Database: "test",
TablePrefix: "",
LogLevel: 4,
PrintSql: false,
},
}