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", OIDC: AuthnOIDCLayerConfig{ HTTPClient: AuthnOIDCHTTPClientConfig{ TransportConfig: NewDefaultTransportConfig(), Timeout: NewInterpolatedDuration(10 * time.Second), }, }, Sessions: AuthnLayerSessionConfig{ TTL: NewInterpolatedDuration(time.Hour), }, }, } } type QueueLayerConfig struct { TemplateDir InterpolatedString `yaml:"templateDir"` DefaultKeepAlive *InterpolatedDuration `yaml:"defaultKeepAlive"` } type AuthnLayerConfig struct { Debug InterpolatedBool `yaml:"debug"` TemplateDir InterpolatedString `yaml:"templateDir"` OIDC AuthnOIDCLayerConfig `yaml:"oidc"` Sessions AuthnLayerSessionConfig `yaml:"sessions"` } type AuthnLayerSessionConfig struct { TTL *InterpolatedDuration `yaml:"ttl"` } type AuthnOIDCLayerConfig struct { HTTPClient AuthnOIDCHTTPClientConfig `yaml:"httpClient"` } type AuthnOIDCHTTPClientConfig struct { TransportConfig Timeout *InterpolatedDuration `yaml:"timeout"` }