mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
a7e867a699
This commit replaces github.com/spf13/viper with github.com/knadh/koanf. Koanf is very similar library to viper, with less dependencies and several quality of life differences. This also allows most config options to be defined by ENV. Lastly it also enables the use of split configuration files which can be configured by setting the --config flag multiple times. Co-authored-by: Amir Zarrinkafsh <nightah@me.com>
16 lines
479 B
Go
16 lines
479 B
Go
package schema
|
|
|
|
// RegulationConfiguration represents the configuration related to regulation.
|
|
type RegulationConfiguration struct {
|
|
MaxRetries int `koanf:"max_retries"`
|
|
FindTime string `koanf:"find_time,weak"`
|
|
BanTime string `koanf:"ban_time,weak"`
|
|
}
|
|
|
|
// DefaultRegulationConfiguration represents default configuration parameters for the regulator.
|
|
var DefaultRegulationConfiguration = RegulationConfiguration{
|
|
MaxRetries: 3,
|
|
FindTime: "2m",
|
|
BanTime: "5m",
|
|
}
|