Documentation
¶
Index ¶
- func GetRouter(routes Routes, additionalHeaders []string) *httprouter.Router
- func GetRouterWithMiddleware(mc middleware.MiddlewareConfig, routes Routes, additionalHeaders []string) http.Handler
- func JsonHandler(handler func(http.ResponseWriter, *http.Request) string) httprouter.Handle
- func PlainTextHandler(lines []string) httprouter.Handle
- type Route
- type Routes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRouter ¶
func GetRouter(routes Routes, additionalHeaders []string) *httprouter.Router
GetRouter returns a router, optionally additional headers can be passed to set
func GetRouterWithMiddleware ¶
func GetRouterWithMiddleware(mc middleware.MiddlewareConfig, routes Routes, additionalHeaders []string) http.Handler
GetRouterWithMiddleware returns a router with middlewares wrapped around it, optionally additional headers can be passed to set
func JsonHandler ¶
func JsonHandler(handler func(http.ResponseWriter, *http.Request) string) httprouter.Handle
JsonHandler handles json responses with appropriate headers
func PlainTextHandler ¶
func PlainTextHandler(lines []string) httprouter.Handle
PlainTextHandler handles plain text responses with appropriate headers