drop seeder and PSQL config

This commit is contained in:
Hayden 2022-09-03 19:14:19 -08:00
parent c2613a03ca
commit 194a90ccfb
7 changed files with 4 additions and 143 deletions

View file

@ -1,14 +1,12 @@
package config
const (
DriverSqlite3 = "sqlite3"
DriverPostgres = "postgres"
DriverSqlite3 = "sqlite3"
)
type Database struct {
Driver string `yaml:"driver" conf:"default:sqlite3"`
SqliteUrl string `yaml:"sqlite-url" conf:"default:file:ent?mode=memory&cache=shared&_fk=1"`
PostgresUrl string `yaml:"postgres-url" conf:""`
Driver string `yaml:"driver" conf:"default:sqlite3"`
SqliteUrl string `yaml:"sqlite-url" conf:"default:file:ent?mode=memory&cache=shared&_fk=1"`
}
func (d *Database) GetDriver() string {
@ -19,8 +17,6 @@ func (d *Database) GetUrl() string {
switch d.Driver {
case DriverSqlite3:
return d.SqliteUrl
case DriverPostgres:
return d.PostgresUrl
default:
panic("unknown database driver")
}