✨ Load config from TOML
This commit is contained in:
parent
e7b88bcc09
commit
9ddaa98ff4
5 changed files with 47 additions and 7 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Reference in a new issue