18 lines
375 B
Go
18 lines
375 B
Go
package conf
|
|
|
|
type Config struct {
|
|
DataSources []string `comment:"mysql 数据源 参考 xorm 数据源配置"`
|
|
AutoSync bool `comment:"自动同步数据库/表结构"`
|
|
}
|
|
|
|
func (m Config) Name() string {
|
|
return "mysql"
|
|
}
|
|
|
|
func NewMysqlConfig(dataSources []string, autoSync bool) *Config {
|
|
return &Config{
|
|
DataSources: dataSources,
|
|
AutoSync: autoSync,
|
|
}
|
|
}
|