bouncer/internal/config/layers.go

30 lines
675 B
Go
Raw Normal View History

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