Documentation
¶
Index ¶
- Variables
- func ValidateConfig(configPath string) error
- type CORS
- type CacheConfig
- type Configuration
- type DefaultRuleConfig
- type FileBasedRuleProviderConfig
- type LogFormat
- type LoggingConfig
- type MetricsConfig
- type PipelineConfig
- type PipelineObject
- type PipelineObjectType
- type PrometheusConfig
- type RuleConfig
- type RuleProviders
- type RulesConfig
- type ServeConfig
- type ServiceConfig
- type SignerConfig
- type TLS
- type Timeout
- type TracingConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Options( fx.Provide(NewConfiguration), fx.Provide(LogConfiguration), )
nolint
Functions ¶
func ValidateConfig ¶
Types ¶
type CORS ¶
type CORS struct {
AllowedOrigins []string `koanf:"allowed_origins"`
AllowedMethods []string `koanf:"allowed_methods"`
AllowedHeaders []string `koanf:"allowed_headers"`
ExposedHeaders []string `koanf:"exposed_headers"`
AllowCredentials bool `koanf:"allow_credentials"`
MaxAge time.Duration `koanf:"max_age,string"`
}
type CacheConfig ¶
type CacheConfig struct {
Type string `koanf:"type"`
}
type Configuration ¶
type Configuration struct {
Serve ServeConfig `koanf:"serve"`
Log LoggingConfig `koanf:"log"`
Tracing TracingConfig `koanf:"tracing"`
Metrics MetricsConfig `koanf:"metrics"`
Signer SignerConfig `koanf:"signer"`
Cache CacheConfig `koanf:"cache"`
Pipeline PipelineConfig `koanf:"pipeline"`
Rules RulesConfig `koanf:"rules,omitempty"`
}
func NewConfiguration ¶
func NewConfiguration(configFile string) (Configuration, error)
type DefaultRuleConfig ¶
type LoggingConfig ¶
type LoggingConfig struct {
Format LogFormat `koanf:"format,string"`
Level zerolog.Level `koanf:"level,string"`
}
func LogConfiguration ¶
func LogConfiguration(configuration Configuration) LoggingConfig
type MetricsConfig ¶
type MetricsConfig struct {
Prometheus PrometheusConfig `koanf:"prometheus"`
}
type PipelineConfig ¶
type PipelineConfig struct {
Authenticators []PipelineObject `koanf:"authenticators"`
Authorizers []PipelineObject `koanf:"authorizers"`
Hydrators []PipelineObject `koanf:"hydrators"`
Mutators []PipelineObject `koanf:"mutators"`
ErrorHandlers []PipelineObject `koanf:"error_handlers"`
}
type PipelineObject ¶
type PipelineObject struct {
ID string `koanf:"id"`
Type PipelineObjectType `koanf:"type,string"`
Config map[string]any `koanf:"config"`
}
type PipelineObjectType ¶
type PipelineObjectType string
const ( POTNoop PipelineObjectType = "noop" POTBasicAuth PipelineObjectType = "basic_auth" POTAnonymous PipelineObjectType = "anonymous" POTOAuth2Introspection PipelineObjectType = "oauth2_introspection" POTJwt PipelineObjectType = "jwt" POTAllow PipelineObjectType = "allow" POTDeny PipelineObjectType = "deny" POTLocal PipelineObjectType = "local" POTRemote PipelineObjectType = "remote" POTDefault PipelineObjectType = "default" POTGeneric PipelineObjectType = "generic" POTHeader PipelineObjectType = "header" POTCookie PipelineObjectType = "cookie" POTRedirect PipelineObjectType = "redirect" POTWWWAuthenticate PipelineObjectType = "www_authenticate" )
func (PipelineObjectType) String ¶
func (p PipelineObjectType) String() string
type PrometheusConfig ¶
type PrometheusConfig struct {
Host string `koanf:"host"`
Port int `koanf:"port"`
MetricsPath string `koanf:"metrics_path"`
}
func (PrometheusConfig) Address ¶
func (c PrometheusConfig) Address() string
type RuleConfig ¶
type RuleProviders ¶
type RuleProviders struct {
File *FileBasedRuleProviderConfig `koanf:"file,omitempty"`
}
type RulesConfig ¶
type RulesConfig struct {
Default *DefaultRuleConfig `koanf:"default,omitempty"`
Providers RuleProviders `koanf:"providers"`
}
type ServeConfig ¶
type ServeConfig struct {
Proxy ServiceConfig `koanf:"proxy"`
DecisionAPI ServiceConfig `koanf:"api"`
}
type ServiceConfig ¶
type ServiceConfig struct {
Host string `koanf:"host"`
Port int `koanf:"port"`
VerboseErrors bool `koanf:"verbose_errors"`
Timeout Timeout `koanf:"timeout"`
CORS *CORS `koanf:"cors,omitempty"`
TLS *TLS `koanf:"tls,omitempty"`
TrustedProxies *[]string `koanf:"trusted_proxies,omitempty"`
}
func (ServiceConfig) Address ¶
func (c ServiceConfig) Address() string
type SignerConfig ¶
type TracingConfig ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.