This repository has been archived on 2025-11-25. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
combluotion-old/config/config.go

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