mirror of
https://github.com/hay-kot/homebox.git
synced 2025-07-25 20:10:27 +00:00
drop seeder and PSQL config
This commit is contained in:
parent
c2613a03ca
commit
194a90ccfb
7 changed files with 4 additions and 143 deletions
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue