Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoltHandler ¶
BoltHandler
func ConfigHandler ¶
ConfigHandler will parse the provided config and then return an http.HandlerFunc (which also implements http.Handler) that will attempt to map any paths to their corresponding URL. If the path is not provided in the config, then the fallback http.Handler will be called instead.
Config is expected to be in the format:
- path: /some-path url: https://www.some-url.com/demo
The only errors that can be returned all related to having invalid config data.
See MapHandler to create a similar http.HandlerFunc via a mapping of paths to urls.
func MapHandler ¶
MapHandler will return an http.HandlerFunc (which also implements http.Handler) that will attempt to map any paths (keys in the map) to their corresponding URL (values that each key in the map points to, in string format). If the path is not provided in the map, then the fallback http.Handler will be called instead.
Types ¶
This section is empty.