Documentation ¶
Index ¶
- Constants
- Variables
- func ValidateConfig(configPath string) error
- type CORS
- type CacheConfig
- type Configuration
- type ConfigurationPath
- type DefaultRuleConfig
- type EnvVarPrefix
- 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 TLSCipherSuites
- type TLSMinVersion
- type Timeout
- type TracingConfig
Constants ¶
View Source
const ( SpanProcessorSimple = "simple" SpanProcessorBatch = "batch" )
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(envPrefix EnvVarPrefix, configFile ConfigurationPath) (Configuration, error)
type ConfigurationPath ¶
type ConfigurationPath string
type DefaultRuleConfig ¶
type EnvVarPrefix ¶
type EnvVarPrefix string
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 { FileSystem *FileBasedRuleProviderConfig `koanf:"file_system,omitempty"` HTTPEndpoint map[string]any `koanf:"http_endpoint,omitempty"` CloudBlob map[string]any `koanf:"cloud_blob,omitempty"` }
type RulesConfig ¶
type RulesConfig struct { Default *DefaultRuleConfig `koanf:"default,omitempty"` Providers RuleProviders `koanf:"providers"` }
type ServeConfig ¶
type ServeConfig struct { Proxy ServiceConfig `koanf:"proxy"` Decision ServiceConfig `koanf:"decision"` Management ServiceConfig `koanf:"management"` }
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 TLS ¶
type TLS struct { Key string `koanf:"key"` Cert string `koanf:"cert"` CipherSuites TLSCipherSuites `koanf:"cipher_suites"` MinVersion TLSMinVersion `koanf:"min_version"` }
type TLSCipherSuites ¶
type TLSCipherSuites []uint16
func (TLSCipherSuites) OrDefault ¶
func (s TLSCipherSuites) OrDefault() []uint16
type TLSMinVersion ¶
type TLSMinVersion uint16
func (TLSMinVersion) OrDefault ¶
func (v TLSMinVersion) OrDefault() uint16
type TracingConfig ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.