dynamic

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 3 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddPrefix

type AddPrefix struct {
	Prefix string `json:"prefix,omitempty"`
}

type BasicAuth

type BasicAuth struct {
	Users        Users  `json:"users,omitempty"`
	UsersFile    string `json:"usersFile,omitempty"`
	Realm        string `json:"realm,omitempty"`
	RemoveHeader bool   `json:"removeHeader,omitempty"`
	HeaderField  string `json:"headerField,omitempty"`
}

type Buffering

type Buffering struct {
	MaxRequestBodyBytes  int64  `json:"maxRequestBodyBytes,omitempty"`
	MemRequestBodyBytes  int64  `json:"memRequestBodyBytes,omitempty"`
	MaxResponseBodyBytes int64  `json:"maxResponseBodyBytes,omitempty"`
	MemResponseBodyBytes int64  `json:"memResponseBodyBytes,omitempty"`
	RetryExpression      string `json:"retryExpression,omitempty"`
}

type Chain

type Chain struct {
	Middlewares []string `json:"middlewares,omitempty"`
}

type CircuitBreaker

type CircuitBreaker struct {
	Expression       string `json:"expression,omitempty"`
	CheckPeriod      string `json:"checkPeriod,omitempty"`
	FallbackDuration string `json:"fallbackDuration,omitempty"`
	RecoveryDuration string `json:"recoveryDuration,omitempty"`
}

type Compress

type Compress struct {
	ExcludedContentTypes []string `json:"excludedContentTypes,omitempty"`
	MinResponseBodyBytes int      `json:"minResponseBodyBytes,omitempty"`
}

type Configuration

type Configuration struct {
	HTTP *HTTPConfiguration `json:"http,omitempty"`
	TCP  *TCPConfiguration  `json:"tcp,omitempty"`
	UDP  *UDPConfiguration  `json:"udp,omitempty"`
	TLS  *TLSConfiguration  `json:"tls,omitempty"`
}

type ContentType

type ContentType struct {
	AutoDetect bool `json:"autoDetect,omitempty"`
}
type Cookie struct {
	Name     string `json:"name,omitempty"`
	Secure   bool   `json:"secure,omitempty"`
	HTTPOnly bool   `json:"httpOnly,omitempty"`
	SameSite string `json:"sameSite,omitempty"`
}

type DigestAuth

type DigestAuth struct {
	Users        Users  `json:"users,omitempty"`
	UsersFile    string `json:"usersFile,omitempty"`
	RemoveHeader bool   `json:"removeHeader,omitempty"`
	Realm        string `json:"realm,omitempty"`
	HeaderField  string `json:"headerField,omitempty"`
}

type ErrorPage

type ErrorPage struct {
	Status  []string `json:"status,omitempty"`
	Service string   `json:"service,omitempty"`
	Query   string   `json:"query,omitempty"`
}

type Failover added in v0.2.0

type Failover struct {
	Service     string       `json:"service,omitempty"`
	Fallback    string       `json:"fallback,omitempty"`
	HealthCheck *HealthCheck `json:"healthCheck,omitempty"`
}

type ForwardAuth

type ForwardAuth struct {
	Address                  string           `json:"address,omitempty"`
	TLS                      *types.ClientTLS `json:"tls,omitempty"`
	TrustForwardHeader       bool             `json:"trustForwardHeader,omitempty"`
	AuthResponseHeaders      []string         `json:"authResponseHeaders,omitempty"`
	AuthResponseHeadersRegex string           `json:"authResponseHeadersRegex,omitempty"`
	AuthRequestHeaders       []string         `json:"authRequestHeaders,omitempty"`
}

type ForwardingTimeouts

type ForwardingTimeouts struct {
	DialTimeout           string `json:"dialTimeout,omitempty"`
	ResponseHeaderTimeout string `json:"responseHeaderTimeout,omitempty"`
	IdleConnTimeout       string `json:"idleConnTimeout,omitempty"`
	ReadIdleTimeout       string `json:"readIdleTimeout,omitempty"`
	PingTimeout           string `json:"pingTimeout,omitempty"`
}

type HTTPConfiguration

type HTTPConfiguration struct {
	Routers           map[string]*Router           `json:"routers,omitempty"`
	Services          map[string]*Service          `json:"services,omitempty"`
	Middlewares       map[string]*Middleware       `json:"middlewares,omitempty"`
	Models            map[string]*Model            `json:"models,omitempty"`
	ServersTransports map[string]*ServersTransport `json:"serversTransports,omitempty"`
}

type Headers

type Headers struct {
	CustomRequestHeaders              map[string]string `json:"customRequestHeaders,omitempty"`
	CustomResponseHeaders             map[string]string `json:"customResponseHeaders,omitempty"`
	AccessControlAllowCredentials     bool              `json:"accessControlAllowCredentials,omitempty"`
	AccessControlAllowHeaders         []string          `json:"accessControlAllowHeaders,omitempty"`
	AccessControlAllowMethods         []string          `json:"accessControlAllowMethods,omitempty"`
	AccessControlAllowOriginList      []string          `json:"accessControlAllowOriginList,omitempty"`
	AccessControlAllowOriginListRegex []string          `json:"accessControlAllowOriginListRegex,omitempty"`
	AccessControlExposeHeaders        []string          `json:"accessControlExposeHeaders,omitempty"`
	AccessControlMaxAge               int64             `json:"accessControlMaxAge,omitempty"`
	AddVaryHeader                     bool              `json:"addVaryHeader,omitempty"`
	AllowedHosts                      []string          `json:"allowedHosts,omitempty"`
	HostsProxyHeaders                 []string          `json:"hostsProxyHeaders,omitempty"`
	SSLRedirect                       bool              `json:"sslRedirect,omitempty"`
	SSLTemporaryRedirect              bool              `json:"sslTemporaryRedirect,omitempty"`
	SSLHost                           string            `json:"sslHost,omitempty"`
	SSLProxyHeaders                   map[string]string `json:"sslProxyHeaders,omitempty"`
	SSLForceHost                      bool              `json:"sslForceHost,omitempty"`
	STSSeconds                        int64             `json:"stsSeconds,omitempty"`
	STSIncludeSubdomains              bool              `json:"stsIncludeSubdomains,omitempty"`
	STSPreload                        bool              `json:"stsPreload,omitempty"`
	ForceSTSHeader                    bool              `json:"forceSTSHeader,omitempty"`
	FrameDeny                         bool              `json:"frameDeny,omitempty"`
	CustomFrameOptionsValue           string            `json:"customFrameOptionsValue,omitempty"`
	ContentTypeNosniff                bool              `json:"contentTypeNosniff,omitempty"`
	BrowserXSSFilter                  bool              `json:"browserXssFilter,omitempty"`
	CustomBrowserXSSValue             string            `json:"customBrowserXSSValue,omitempty"`
	ContentSecurityPolicy             string            `json:"contentSecurityPolicy,omitempty"`
	PublicKey                         string            `json:"publicKey,omitempty"`
	ReferrerPolicy                    string            `json:"referrerPolicy,omitempty"`
	FeaturePolicy                     string            `json:"featurePolicy,omitempty"`
	PermissionsPolicy                 string            `json:"permissionsPolicy,omitempty"`
	IsDevelopment                     bool              `json:"isDevelopment,omitempty"`
}

type HealthCheck

type HealthCheck struct {
}

type IPAllowList added in v0.4.0

type IPAllowList struct {
	SourceRange []string    `json:"sourceRange,omitempty"`
	IPStrategy  *IPStrategy `json:"ipStrategy,omitempty"`
}

type IPStrategy

type IPStrategy struct {
	Depth       int      `json:"depth,omitempty"`
	ExcludedIPs []string `json:"excludedIPs,omitempty"`
}

type IPWhiteList

type IPWhiteList struct {
	SourceRange []string    `json:"sourceRange,omitempty"`
	IPStrategy  *IPStrategy `json:"ipStrategy,omitempty"`
}

type InFlightReq

type InFlightReq struct {
	Amount          int64            `json:"amount,omitempty"`
	SourceCriterion *SourceCriterion `json:"sourceCriterion,omitempty"`
}

type JSONPayload

type JSONPayload struct {
	*Configuration
}

func (JSONPayload) MarshalJSON

func (c JSONPayload) MarshalJSON() ([]byte, error)

type Middleware

type Middleware struct {
	AddPrefix         *AddPrefix            `json:"addPrefix,omitempty"`
	StripPrefix       *StripPrefix          `json:"stripPrefix,omitempty"`
	StripPrefixRegex  *StripPrefixRegex     `json:"stripPrefixRegex,omitempty"`
	ReplacePath       *ReplacePath          `json:"replacePath,omitempty"`
	ReplacePathRegex  *ReplacePathRegex     `json:"replacePathRegex,omitempty"`
	Chain             *Chain                `json:"chain,omitempty"`
	IPWhiteList       *IPWhiteList          `json:"ipWhiteList,omitempty"`
	IPAllowList       *IPAllowList          `json:"ipAllowList,omitempty"`
	Headers           *Headers              `json:"headers,omitempty"`
	Errors            *ErrorPage            `json:"errors,omitempty"`
	RateLimit         *RateLimit            `json:"rateLimit,omitempty"`
	RedirectRegex     *RedirectRegex        `json:"redirectRegex,omitempty"`
	RedirectScheme    *RedirectScheme       `json:"redirectScheme,omitempty"`
	BasicAuth         *BasicAuth            `json:"basicAuth,omitempty"`
	DigestAuth        *DigestAuth           `json:"digestAuth,omitempty"`
	ForwardAuth       *ForwardAuth          `json:"forwardAuth,omitempty"`
	InFlightReq       *InFlightReq          `json:"inFlightReq,omitempty"`
	Buffering         *Buffering            `json:"buffering,omitempty"`
	CircuitBreaker    *CircuitBreaker       `json:"circuitBreaker,omitempty"`
	Compress          *Compress             `json:"compress,omitempty"`
	PassTLSClientCert *PassTLSClientCert    `json:"passTLSClientCert,omitempty"`
	Retry             *Retry                `json:"retry,omitempty"`
	ContentType       *ContentType          `json:"contentType,omitempty"`
	Plugin            map[string]PluginConf `json:"plugin,omitempty"`
}

type MirrorService

type MirrorService struct {
	Name    string `json:"name,omitempty"`
	Percent int    `json:"percent,omitempty"`
}

type Mirroring

type Mirroring struct {
	Service     string          `json:"service,omitempty"`
	MaxBodySize *int64          `json:"maxBodySize,omitempty"`
	Mirrors     []MirrorService `json:"mirrors,omitempty"`
	HealthCheck *HealthCheck    `json:"healthCheck,omitempty"`
}

type Model

type Model struct {
	Middlewares []string         `json:"middlewares,omitempty"`
	TLS         *RouterTLSConfig `json:"tls,omitempty"`
}

type PassTLSClientCert

type PassTLSClientCert struct {
	PEM  bool                      `json:"pem,omitempty"`
	Info *TLSClientCertificateInfo `json:"info,omitempty"`
}

type PluginConf

type PluginConf map[string]any

type ProxyProtocol

type ProxyProtocol struct {
	Version int `json:"version,omitempty"`
}

type RateLimit

type RateLimit struct {
	Average         int64            `json:"average,omitempty"`
	Period          string           `json:"period,omitempty"`
	Burst           int64            `json:"burst,omitempty"`
	SourceCriterion *SourceCriterion `json:"sourceCriterion,omitempty"`
}

type RedirectRegex

type RedirectRegex struct {
	Regex       string `json:"regex,omitempty"`
	Replacement string `json:"replacement,omitempty"`
	Permanent   bool   `json:"permanent,omitempty"`
}

type RedirectScheme

type RedirectScheme struct {
	Scheme    string `json:"scheme,omitempty"`
	Port      string `json:"port,omitempty"`
	Permanent bool   `json:"permanent,omitempty"`
}

type ReplacePath

type ReplacePath struct {
	Path string `json:"path,omitempty"`
}

type ReplacePathRegex

type ReplacePathRegex struct {
	Regex       string `json:"regex,omitempty"`
	Replacement string `json:"replacement,omitempty"`
}

type ResponseForwarding

type ResponseForwarding struct {
	FlushInterval string `json:"flushInterval,omitempty"`
}

type Retry

type Retry struct {
	Attempts        int    `json:"attempts,omitempty"`
	InitialInterval string `json:"initialInterval,omitempty"`
}

type Router

type Router struct {
	EntryPoints []string         `json:"entryPoints,omitempty"`
	Middlewares []string         `json:"middlewares,omitempty"`
	Service     string           `json:"service,omitempty"`
	Rule        string           `json:"rule,omitempty"`
	Priority    int              `json:"priority,omitempty"`
	TLS         *RouterTLSConfig `json:"tls,omitempty"`
}

type RouterTCPTLSConfig

type RouterTCPTLSConfig struct {
	Passthrough  bool           `json:"passthrough"`
	Options      string         `json:"options,omitempty"`
	CertResolver string         `json:"certResolver,omitempty"`
	Domains      []types.Domain `json:"domains,omitempty"`
}

type RouterTLSConfig

type RouterTLSConfig struct {
	Options      string         `json:"options,omitempty"`
	CertResolver string         `json:"certResolver,omitempty"`
	Domains      []types.Domain `json:"domains,omitempty"`
}

type Server

type Server struct {
	URL string `json:"url,omitempty"`
}

type ServerHealthCheck

type ServerHealthCheck struct {
	Scheme          string            `json:"scheme,omitempty"`
	Path            string            `json:"path,omitempty"`
	Method          string            `json:"method,omitempty"`
	Port            int               `json:"port,omitempty"`
	Interval        string            `json:"interval,omitempty"`
	Timeout         string            `json:"timeout,omitempty"`
	Hostname        string            `json:"hostname,omitempty"`
	FollowRedirects *bool             `json:"followRedirects"`
	Headers         map[string]string `json:"headers,omitempty"`
}

type ServersLoadBalancer

type ServersLoadBalancer struct {
	Sticky             *Sticky             `json:"sticky,omitempty"`
	Servers            []Server            `json:"servers,omitempty"`
	HealthCheck        *ServerHealthCheck  `json:"healthCheck,omitempty"`
	PassHostHeader     *bool               `json:"passHostHeader"`
	ResponseForwarding *ResponseForwarding `json:"responseForwarding,omitempty"`
	ServersTransport   string              `json:"serversTransport,omitempty"`
}

type ServersTransport

type ServersTransport struct {
	ServerName          string              `json:"serverName,omitempty"`
	InsecureSkipVerify  bool                `json:"insecureSkipVerify,omitempty"`
	RootCAs             []string            `json:"rootCAs,omitempty"`
	Certificates        tls.Certificates    `json:"certificates,omitempty"`
	MaxIdleConnsPerHost int                 `json:"maxIdleConnsPerHost,omitempty"`
	ForwardingTimeouts  *ForwardingTimeouts `json:"forwardingTimeouts,omitempty"`
	DisableHTTP2        bool                `json:"disableHTTP2,omitempty"`
	PeerCertURI         string              `json:"peerCertURI,omitempty"`
}

type Service

type Service struct {
	LoadBalancer *ServersLoadBalancer `json:"loadBalancer,omitempty"`
	Weighted     *WeightedRoundRobin  `json:"weighted,omitempty"`
	Mirroring    *Mirroring           `json:"mirroring,omitempty"`
	Failover     *Failover            `json:"failover,omitempty"`
}

type SourceCriterion

type SourceCriterion struct {
	IPStrategy        *IPStrategy `json:"ipStrategy,omitempty"`
	RequestHeaderName string      `json:"requestHeaderName,omitempty"`
	RequestHost       bool        `json:"requestHost,omitempty"`
}

type Sticky

type Sticky struct {
	Cookie *Cookie `json:"cookie,omitempty"`
}

type StripPrefix

type StripPrefix struct {
	Prefixes   []string `json:"prefixes,omitempty"`
	ForceSlash bool     `json:"forceSlash,omitempty"`
}

type StripPrefixRegex

type StripPrefixRegex struct {
	Regex []string `json:"regex,omitempty"`
}

type TCPConfiguration

type TCPConfiguration struct {
	Routers     map[string]*TCPRouter     `json:"routers,omitempty"`
	Services    map[string]*TCPService    `json:"services,omitempty"`
	Middlewares map[string]*TCPMiddleware `json:"middlewares,omitempty"`
}

type TCPIPAllowList added in v0.4.0

type TCPIPAllowList struct {
	SourceRange []string `json:"sourceRange,omitempty"`
}

type TCPIPWhiteList

type TCPIPWhiteList struct {
	SourceRange []string `json:"sourceRange,omitempty"`
}

type TCPInFlightConn added in v0.2.0

type TCPInFlightConn struct {
	Amount int64 `json:"amount,omitempty"`
}

type TCPMiddleware

type TCPMiddleware struct {
	InFlightConn *TCPInFlightConn `json:"inFlightConn,omitempty"`
	IPWhiteList  *TCPIPWhiteList  `json:"ipWhiteList,omitempty"`
	IPAllowList  *TCPIPAllowList  `json:"ipAllowList,omitempty"`
}

type TCPRouter

type TCPRouter struct {
	EntryPoints []string            `json:"entryPoints,omitempty"`
	Middlewares []string            `json:"middlewares,omitempty"`
	Service     string              `json:"service,omitempty"`
	Rule        string              `json:"rule,omitempty"`
	Priority    int                 `json:"priority,omitempty"`
	TLS         *RouterTCPTLSConfig `json:"tls,omitempty"`
}

type TCPServer

type TCPServer struct {
	Address string `json:"address,omitempty"`
}

type TCPServersLoadBalancer

type TCPServersLoadBalancer struct {
	TerminationDelay *int           `json:"terminationDelay,omitempty"`
	ProxyProtocol    *ProxyProtocol `json:"proxyProtocol,omitempty"`
	Servers          []TCPServer    `json:"servers,omitempty"`
}

type TCPService

type TCPService struct {
	LoadBalancer *TCPServersLoadBalancer `json:"loadBalancer,omitempty"`
	Weighted     *TCPWeightedRoundRobin  `json:"weighted,omitempty"`
}

type TCPWRRService

type TCPWRRService struct {
	Name   string `json:"name,omitempty"`
	Weight *int   `json:"weight,omitempty"`
}

type TCPWeightedRoundRobin

type TCPWeightedRoundRobin struct {
	Services []TCPWRRService `json:"services,omitempty"`
}

type TLSClientCertificateInfo

type TLSClientCertificateInfo struct {
	NotAfter     bool                               `json:"notAfter,omitempty"`
	NotBefore    bool                               `json:"notBefore,omitempty"`
	Sans         bool                               `json:"sans,omitempty"`
	SerialNumber bool                               `json:"serialNumber,omitempty"`
	Subject      *TLSClientCertificateSubjectDNInfo `json:"subject,omitempty"`
	Issuer       *TLSClientCertificateIssuerDNInfo  `json:"issuer,omitempty"`
}

type TLSClientCertificateIssuerDNInfo added in v0.2.0

type TLSClientCertificateIssuerDNInfo struct {
	Country         bool `json:"country,omitempty"`
	Province        bool `json:"province,omitempty"`
	Locality        bool `json:"locality,omitempty"`
	Organization    bool `json:"organization,omitempty"`
	CommonName      bool `json:"commonName,omitempty"`
	SerialNumber    bool `json:"serialNumber,omitempty"`
	DomainComponent bool `json:"domainComponent,omitempty"`
}

type TLSClientCertificateSubjectDNInfo added in v0.2.0

type TLSClientCertificateSubjectDNInfo struct {
	Country            bool `json:"country,omitempty"`
	Province           bool `json:"province,omitempty"`
	Locality           bool `json:"locality,omitempty"`
	Organization       bool `json:"organization,omitempty"`
	OrganizationalUnit bool `json:"organizationalUnit,omitempty"`
	CommonName         bool `json:"commonName,omitempty"`
	SerialNumber       bool `json:"serialNumber,omitempty"`
	DomainComponent    bool `json:"domainComponent,omitempty"`
}

type TLSConfiguration

type TLSConfiguration struct {
	Certificates []*tls.CertAndStores   `json:"certificates,omitempty"`
	Options      map[string]tls.Options `json:"options,omitempty"`
	Stores       map[string]tls.Store   `json:"stores,omitempty"`
}

type UDPConfiguration

type UDPConfiguration struct {
	Routers  map[string]*UDPRouter  `json:"routers,omitempty"`
	Services map[string]*UDPService `json:"services,omitempty"`
}

type UDPRouter

type UDPRouter struct {
	EntryPoints []string `json:"entryPoints,omitempty"`
	Service     string   `json:"service,omitempty"`
}

type UDPServer

type UDPServer struct {
	Address string `json:"address,omitempty"`
}

type UDPServersLoadBalancer

type UDPServersLoadBalancer struct {
	Servers []UDPServer `json:"servers,omitempty"`
}

type UDPService

type UDPService struct {
	LoadBalancer *UDPServersLoadBalancer `json:"loadBalancer,omitempty"`
	Weighted     *UDPWeightedRoundRobin  `json:"weighted,omitempty"`
}

type UDPWRRService

type UDPWRRService struct {
	Name   string `json:"name,omitempty"`
	Weight *int   `json:"weight,omitempty"`
}

type UDPWeightedRoundRobin

type UDPWeightedRoundRobin struct {
	Services []UDPWRRService `json:"services,omitempty"`
}

type Users

type Users []string

type WRRService

type WRRService struct {
	Name   string `json:"name,omitempty"`
	Weight *int   `json:"weight,omitempty"`
}

type WeightedRoundRobin

type WeightedRoundRobin struct {
	Services    []WRRService `json:"services,omitempty"`
	Sticky      *Sticky      `json:"sticky,omitempty"`
	HealthCheck *HealthCheck `json:"healthCheck,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL