combluotion/config/config.go
2024-09-14 23:07:28 -05:00

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)
}