sk-matrix-project/backend/golang/matrix-middle-service/pkg/database/driver/mysql/conf/config.go
2023-02-26 21:20:11 +08:00

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,
}
}