18 lines
405 B
Go
18 lines
405 B
Go
package config
|
|
|
|
type Config struct {
|
|
Name string `toml:"name"`
|
|
Env Env `toml:"env"`
|
|
BaseURL string `toml:"base_url"`
|
|
Conn ConnSettings `toml:"conn"`
|
|
}
|
|
|
|
type ConnSettings struct {
|
|
Store string `toml:"store"`
|
|
DSN string `toml:"dsn"`
|
|
Settings map[string]any `toml:"settings"`
|
|
}
|
|
|
|
func (c Config) Environment() Env {
|
|
return ValidEnvOrDev(c.Env)
|
|
}
|