2023-06-13 03:57:13 +02:00
|
|
|
package config
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
type LayersConfig struct {
|
2024-05-17 17:29:26 +02:00
|
|
|
Queue QueueLayerConfig `yaml:"queue"`
|
|
|
|
Authn AuthnLayerConfig `yaml:"authn"`
|
2023-06-13 03:57:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func NewDefaultLayersConfig() LayersConfig {
|
|
|
|
return LayersConfig{
|
|
|
|
Queue: QueueLayerConfig{
|
|
|
|
TemplateDir: "./layers/queue/templates",
|
|
|
|
DefaultKeepAlive: NewInterpolatedDuration(time.Minute),
|
|
|
|
},
|
2024-05-17 17:29:26 +02:00
|
|
|
Authn: AuthnLayerConfig{
|
|
|
|
TemplateDir: "./layers/authn/templates",
|
2023-07-06 03:19:45 +02:00
|
|
|
},
|
2023-06-13 03:57:13 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
type QueueLayerConfig struct {
|
|
|
|
TemplateDir InterpolatedString `yaml:"templateDir"`
|
|
|
|
DefaultKeepAlive *InterpolatedDuration `yaml:"defaultKeepAlive"`
|
|
|
|
}
|
2023-07-06 03:19:45 +02:00
|
|
|
|
2024-05-17 17:29:26 +02:00
|
|
|
type AuthnLayerConfig struct {
|
2023-07-06 03:19:45 +02:00
|
|
|
TemplateDir InterpolatedString `yaml:"templateDir"`
|
|
|
|
}
|