Documentation
¶
Overview ¶
Package config represents the user provided config file structure. Right now with only JSON support.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddHeaderRule ¶
AddHeaderRule is a single entry for add-header sections.
type AddRequestCookieRule ¶
type AddRequestCookieRule struct { PathMatcher string `json:"path"` Name string `json:"name"` Value string `json:"value"` }
AddRequestCookieRule is a single entry for add-request-cookie.
type Config ¶
type Config struct { Server Server `json:"server"` Upstream string `json:"upstream"` DisableTLS bool `json:"disableTLSVerify"` StaticServers []StaticServer `json:"staticServers"` RequestDispatchers []DispatchRule `json:"requestDispatchers"` ResponseModifiers ResponseModifier `json:"responseModifiers"` ResponseHeaderAdders []AddHeaderRule `json:"addResponseHeader"` RequestCookieAdders []AddRequestCookieRule `json:"addRequestCookie"` }
Config represents the whole JSON config file structure.
type DispatchDestination ¶
type DispatchDestination struct { Server string `json:"server"` Scheme string `json:"scheme"` Host string `json:"host"` PathReplacer string `json:"path"` URL string `json:"url"` }
DispatchDestination is the destination part of a request dispatcher.
type DispatchRule ¶
type DispatchRule struct { PathMatcher string `json:"path"` Destination DispatchDestination `json:"destination"` }
DispatchRule is a single entry for the request dispatcher section.
type PatchBodyRule ¶
PatchBodyRule is a single entry for the patch body section.
type PatchHeaderRule ¶
type PatchHeaderRule struct { Name string `json:"name"` Matcher string `json:"matcher"` Replacer string `json:"replacer"` }
PatchHeaderRule is a single entry for the modify header section.
type ResponseModifier ¶
type ResponseModifier struct { HeaderPatchers []PatchHeaderRule `json:"header"` BodyPatchers []PatchBodyRule `json:"body"` }
ResponseModifier TODO
type StaticServer ¶
StaticServer is the section for the additional local static file server.