Documentation
¶
Index ¶
- type AdminAPI
- type AdminConfig
- type AuthConfig
- type AuthMapping
- type AuthMethodBasic
- type AuthMethods
- type AuthScheme
- type AuthZ
- type BackendTLS
- type GatewayConfig
- type OASBackendMapping
- type OASBackendMappingOpts
- type OASConfig
- type ObservabilityConfig
- type RootConfig
- type Router
- type RouterBackend
- type ServerTLS
- type SuperUser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminConfig ¶ added in v0.8.1
type AdminConfig struct {
SuperUser *SuperUser `json:"superUser"`
API *AdminAPI `json:"api,omitempty"`
}
AdminConfig holds configuration for the admin API.
type AuthConfig ¶ added in v0.8.1
type AuthConfig struct {
Methods *AuthMethods `json:"methods"`
Scheme *AuthScheme `json:"scheme"`
Order int `json:"order"`
}
AuthConfig holds configuration for authentication and authorization.
type AuthMapping ¶ added in v0.8.1
type AuthMethodBasic ¶ added in v0.8.1
type AuthMethodBasic struct{}
type AuthMethods ¶ added in v0.8.1
type AuthMethods struct {
Basic *AuthMethodBasic `json:"basic"`
}
type AuthScheme ¶ added in v0.8.1
type AuthScheme struct {
Mappings []*AuthMapping `json:"mappings"`
}
type BackendTLS ¶ added in v0.9.0
type BackendTLS struct {
// RootCAFile is the path to a PEM-encoded CA bundle used to verify the backend's certificate.
// When empty, the system certificate pool is used.
RootCAFile string `json:"rootCAFile,omitempty"`
// ClientCertFile and ClientKeyFile enable mTLS.
// Both must be set together.
ClientCertFile string `json:"clientCertFile,omitempty"`
ClientKeyFile string `json:"clientKeyFile,omitempty"`
// InsecureSkipVerify disables server certificate verification.
// Must only be used in non-production environments.
InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"`
}
BackendTLS holds per-backend TLS settings. When nil, the forwarder uses plain HTTP for that backend.
type GatewayConfig ¶ added in v0.9.0
GatewayConfig holds configuration for the API gateway.
type OASBackendMapping ¶ added in v0.8.1
type OASBackendMapping struct {
Backend string `json:"backend"`
Specification string `json:"specification"`
Options *OASBackendMappingOpts `json:"options"`
}
type OASBackendMappingOpts ¶ added in v0.8.1
type OASBackendMappingOpts struct {
ValidateBody bool `json:"validateBody"`
}
type OASConfig ¶ added in v0.8.1
type OASConfig struct {
Order int `json:"order"`
Mappings []*OASBackendMapping `json:"mappings"`
}
OASConfig holds configuration for OAS-based request routing and validation.
type ObservabilityConfig ¶ added in v0.8.1
type ObservabilityConfig struct {
Enabled bool `json:"enabled"`
RuntimeMetrics bool `json:"runtimeMetrics"`
}
ObservabilityConfig holds configuration for observability features.
type RootConfig ¶ added in v0.8.1
type RootConfig struct {
*GatewayConfig `json:"gateway"`
*ObservabilityConfig `json:"observability"`
*AdminConfig `json:"admin"`
*OASConfig `json:"oas,omitempty"`
*AuthConfig `json:"auth,omitempty"`
// contains filtered or unexported fields
}
func New ¶
func New() *RootConfig
func (*RootConfig) AuthEnabled ¶ added in v0.8.1
func (rc *RootConfig) AuthEnabled() bool
func (*RootConfig) Load ¶ added in v0.8.1
func (rc *RootConfig) Load(data []byte)
func (*RootConfig) OASEnabled ¶ added in v0.8.1
func (rc *RootConfig) OASEnabled() bool
func (*RootConfig) Parse ¶ added in v0.8.1
func (rc *RootConfig) Parse() error
type Router ¶ added in v0.9.0
type Router struct {
Backends []*RouterBackend `json:"backends"`
}
Router holds configuration for the request router.
type RouterBackend ¶ added in v0.8.1
type RouterBackend struct {
Name string `json:"name"`
Host string `json:"host"`
Port int `json:"port"`
TimeoutMs int `json:"timeout,omitempty"`
TLS *BackendTLS `json:"tls,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.