Documentation
¶
Index ¶
- func New(selectors ...*Selector) *httputil.ReverseProxy
- type Rule
- func AllOf(rules ...Rule) Rule
- func Always() Rule
- func AnyOf(rules ...Rule) Rule
- func HasHeader(header string) Rule
- func HasQueryParam(param string) Rule
- func HeaderContains(header string, value string) Rule
- func HostMatches(host string) Rule
- func HostPathIsAt(hostpath string) Rule
- func IPMatches(clientIP string) Rule
- func MethodMatches(method string) Rule
- func PathIsAt(path string) Rule
- func QueryParamContains(param string, value string) Rule
- type SelectOption
- type Selector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(selectors ...*Selector) *httputil.ReverseProxy
Types ¶
type Rule ¶
Rule is a boolean function if a match condition is found in request is for matching out request is for modifying outgoing request, as is in PathIsAt
func HasQueryParam ¶
HasQueryParam matches if query param key exists in request
func HeaderContains ¶
HeaderContains matches if header kv pair exists in request
func HostPathIsAt ¶
HostPathIsAt matches on HostMatches and PathIsAt
func MethodMatches ¶
MethodMatches matches on the request method
func PathIsAt ¶
PathIsAt matches if request path is prepended by given path also trims that path from outgoing request
func QueryParamContains ¶
QueryParamContains matches if query param kv pair exists in request
type SelectOption ¶
type SelectOption func(*Selector)
SelectOption modifies the selector
func WithOIDC ¶
func WithOIDC() SelectOption
WithOIDC sets the authorization header using an OIDC token generated for the service