Load config from TOML

This commit is contained in:
Dan Jones 2024-09-14 23:07:28 -05:00
commit 9ddaa98ff4
5 changed files with 47 additions and 7 deletions

View file

@ -1,16 +1,16 @@
package config
type Config struct {
Name string
Env Env
BaseURL string
Conn ConnSettings
Name string `toml:"name"`
Env Env `toml:"env"`
BaseURL string `toml:"base_url"`
Conn ConnSettings `toml:"conn"`
}
type ConnSettings struct {
Store string
DSN string
AdditionalSettings map[string]any
Store string `toml:"store"`
DSN string `toml:"dsn"`
Settings map[string]any `toml:"settings"`
}
func (c Config) Environment() Env {