20 lines
408 B
Go
20 lines
408 B
Go
package config
|
|
|
|
type Storage struct {
|
|
Database Database `envPrefix:"DATABASE_"`
|
|
Object Object `envPrefix:"OBJECT_"`
|
|
}
|
|
|
|
type Database struct {
|
|
DSN string `env:"DSN" envDefault:"sqlite://data.sqlite"`
|
|
}
|
|
|
|
type Object struct {
|
|
DSN string `env:"DSN" envDefault:"sqlite://data.sqlite"`
|
|
Encryption Encryption `envPrefix:"ENCRYPTION_"`
|
|
}
|
|
|
|
type Encryption struct {
|
|
Key string `env:"KEY,unset"`
|
|
}
|