💾 Archived View for gemini.rmf-dev.com › repo › Vaati › Gemigit › files › 7246147ca2c9655ff3c275b10d… captured on 2022-07-16 at 17:09:25. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
0 package config
1
2 import "github.com/kkyr/fig"
3
4 var Cfg Config
5
6 type Config struct {
7 Gemigit struct {
8 Https bool `validate:"required"`
9 Port int `validate:"required"`
10 Name string `validate:"required"`
11 Domain string `validate:"required"`
12 AllowRegistration bool `validate:"required"`
13 Database string `validate:"required"`
14 MaxAttemptsForIP int `validate:"required"`
15 MaxAttemptsForAccount int `validate:"required"`
16 AuthTimeout int `validate:"required"`
17 }
18 }
19
20 func LoadConfig() error {
21 return fig.Load(&Cfg,
22 fig.File("config.yaml"),
23 fig.Dirs(".", "/etc/gemigit", "/usr/local/etc/gemigit"),
24 )
25 }
26