14 lines
344 B
Go
14 lines
344 B
Go
|
package config
|
||
|
|
||
|
type StorageConfig struct {
|
||
|
Driver string `yaml:"driver" env:"DRIVER"`
|
||
|
DSN string `yaml:"dsn" env:"DSN"`
|
||
|
}
|
||
|
|
||
|
func NewDefaultStorageConfig() StorageConfig {
|
||
|
return StorageConfig{
|
||
|
Driver: "sqlite",
|
||
|
DSN: "./data/storage.sqlite?mode=rw&_pragma=foreign_keys(1)&_pragma=busy_timeout=150000&_pragma=journal_mode=WAL",
|
||
|
}
|
||
|
}
|