Documentation
¶
Index ¶
- func CacheModifier(cfg Config, parentModifier func(r *http.Response) error) func(*http.Response) error
- func CreateOSMapsProxy(target *url.URL, cfg Config, responseModifier func(r *http.Response) error) *httputil.ReverseProxy
- func StringReplaceResponseModifier(from, to string) func(*http.Response) error
- type API
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheModifier ¶ added in v0.2.0
func CacheModifier(cfg Config, parentModifier func(r *http.Response) error) func(*http.Response) error
CacheModifier returns a ResponseModifier that sets a maximum cache header It optionally takes another response modifier that it wraps around and performs first when called
func CreateOSMapsProxy ¶ added in v0.2.0
func CreateOSMapsProxy(target *url.URL, cfg Config, responseModifier func(r *http.Response) error) *httputil.ReverseProxy
CreateOSMapsProxy returns a ReverseProxy that modifies requests to add an Ordnance Survey api key and forward them on to the O/S api. It can also optionally modify the response (for example the URLS contained in the response)
func StringReplaceResponseModifier ¶ added in v0.2.0
StringReplaceResponseModifier returns a function that takes in a pointer to a Response object that modifies that response by changing every instance of a string in the body to another string.
Types ¶
Click to show internal directories.
Click to hide internal directories.