sqlboiler/boilingcore/config.go
Aaron L 761efee9f0 Add ability to replace a template
- This feature remains undocumented because it's not a good idea in most
  cases but it enables us to replace a template. This is especially
  useful when using sqlboiler as a library since testmain
  problematically loads config in it's own magical way, divorced from
  even the way sqlboiler in "normal" mode loads it. This enables
  replacement of that mechanism by replacing it's template.
2017-01-15 21:21:04 -08:00

41 lines
798 B
Go

package boilingcore
// Config for the running of the commands
type Config struct {
DriverName string
Schema string
PkgName string
OutFolder string
BaseDir string
WhitelistTables []string
BlacklistTables []string
Tags []string
Replacements []string
Debug bool
NoTests bool
NoHooks bool
NoAutoTimestamps bool
Postgres PostgresConfig
MySQL MySQLConfig
}
// PostgresConfig configures a postgres database
type PostgresConfig struct {
User string
Pass string
Host string
Port int
DBName string
SSLMode string
}
// MySQLConfig configures a mysql database
type MySQLConfig struct {
User string
Pass string
Host string
Port int
DBName string
SSLMode string
}