30 lines
675 B
Go
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"`
|
|
}
|