21 lines
449 B
Go
21 lines
449 B
Go
package config
|
|
|
|
const (
|
|
DatabaseDriverPostgres = "postgres"
|
|
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://emissary.sqlite",
|
|
}
|
|
}
|