combluotion/config/config.go

19 lines
405 B
Go
Raw Normal View History

2024-09-12 16:40:31 -05:00
package config
type Config struct {
2024-09-14 23:07:28 -05:00
Name string `toml:"name"`
Env Env `toml:"env"`
BaseURL string `toml:"base_url"`
Conn ConnSettings `toml:"conn"`
}
type ConnSettings struct {
2024-09-14 23:07:28 -05:00
Store string `toml:"store"`
DSN string `toml:"dsn"`
Settings map[string]any `toml:"settings"`
2024-09-12 16:40:31 -05:00
}
2024-09-13 13:38:30 -05:00
func (c Config) Environment() Env {
return ValidEnvOrDev(c.Env)
}