兼容代码生成
This commit is contained in:
1 parent
78671ae99e
commit
734a48dbb8
2 files changed
+1
-6
No files matched your search
@@ -58,7 +58,7 @@ func Setup(f func(opts ...source.Option) source.Source, options ...source.Option
|
|||||||
Ssl: SslConfig,
|
Ssl: SslConfig,
|
||||||
Logger: LoggerConfig,
|
Logger: LoggerConfig,
|
||||||
Jwt: JwtConfig,
|
Jwt: JwtConfig,
|
||||||
Database: new(Database),
|
Database: DatabaseConfig,
|
||||||
Databases: &DatabasesConfig,
|
Databases: &DatabasesConfig,
|
||||||
Gen: GenConfig,
|
Gen: GenConfig,
|
||||||
Extend: ExtendConfig,
|
Extend: ExtendConfig,
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
import "gorm.io/plugin/dbresolver"
|
|
||||||
|
|
||||||
type Database struct {
|
type Database struct {
|
||||||
Driver string
|
Driver string
|
||||||
Source string
|
Source string
|
||||||
@@ -22,7 +20,4 @@ type DBResolverConfig struct {
|
|||||||
var (
|
var (
|
||||||
DatabaseConfig = new(Database)
|
DatabaseConfig = new(Database)
|
||||||
DatabasesConfig = make(map[string]*Database)
|
DatabasesConfig = make(map[string]*Database)
|
||||||
Policies = map[string]dbresolver.Policy{
|
|
||||||
"random": dbresolver.RandomPolicy{},
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
Reference in new issue
Block a user