bouncer/internal/config/database.go

20 lines
460 B
Go
Raw Normal View History

2023-04-24 20:52:12 +02:00
package config
const (
DatabaseDriverSQLite = "sqlite"
)
// DatabaseConfig definition
type DatabaseConfig struct {
Driver InterpolatedString `yaml:"driver"`
DSN InterpolatedString `yaml:"dsn"`
}
// NewDefaultDatabaseConfig return the default database configuration
func NewDefaultDatabaseConfig() DatabaseConfig {
return DatabaseConfig{
Driver: "sqlite",
DSN: "sqlite://bouncer.sqlite?_pragma=foreign_keys(1)&_pragma=busy_timeout=10000",
}
}