bouncer/internal/config/layers.go
William Petit 5a34d5917f
Some checks are pending
Cadoles/bouncer/pipeline/head Build started...
Cadoles/bouncer/pipeline/pr-develop Build started...
feat: transform circuitbreaker layer in authn-network layer
2024-05-17 17:29:26 +02:00

30 lines
675 B
Go

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",
},
}
}
type QueueLayerConfig struct {
TemplateDir InterpolatedString `yaml:"templateDir"`
DefaultKeepAlive *InterpolatedDuration `yaml:"defaultKeepAlive"`
}
type AuthnLayerConfig struct {
TemplateDir InterpolatedString `yaml:"templateDir"`
}