Documentation ¶ Index ¶ func New(cfg Config) (*gorm.DB, error) type Config type ResolverConfig Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func New ¶ func New(cfg Config) (*gorm.DB, error) Types ¶ type Config ¶ type Config struct { Debug bool DBType string // mysql/postgres/sqlite3 DSN string MaxLifetime int MaxIdleTime int MaxOpenConns int MaxIdleConns int TablePrefix string Resolver []ResolverConfig } type ResolverConfig ¶ type ResolverConfig struct { DBType string // mysql/postgres/sqlite3 Sources []string Replicas []string Tables []string } Source Files ¶ View all Source files gorm.go Click to show internal directories. Click to hide internal directories.