Documentation ¶
Index ¶
- Constants
- func HTTPSRedirect(w http.ResponseWriter, r *http.Request)
- func Handle400WithMessage(w http.ResponseWriter, r *http.Request, message string)
- func Handle404(w http.ResponseWriter, r *http.Request)
- func Handle404WithMessage(w http.ResponseWriter, r *http.Request, message string)
- func Handle405(w http.ResponseWriter, r *http.Request)
- func Handle500(w http.ResponseWriter, r *http.Request, message string)
- func HandleHTTPError(w http.ResponseWriter, r *http.Request, message string, code int)
- func HandleOIDCError(w http.ResponseWriter, r *http.Request, err oidc.OpenIDError, code int)
- func RegisterMiddleware(r *mux.Router)
- func RegisterServerRoutes(r *mux.Router)
Constants ¶
const TimeFormat = "2006-01-02 15:04:05"
TimeFormat is the time format used fro formatting time :o
Variables ¶
This section is empty.
Functions ¶
func HTTPSRedirect ¶
func HTTPSRedirect(w http.ResponseWriter, r *http.Request)
HTTPSRedirect handles redirection to https
func Handle400WithMessage ¶
func Handle400WithMessage(w http.ResponseWriter, r *http.Request, message string)
Handle400WithMessage returns a 400 BadRequest error page with a custom message.
func Handle404 ¶
func Handle404(w http.ResponseWriter, r *http.Request)
Handle404 returns a generic 404 NotFound error page.
func Handle404WithMessage ¶
func Handle404WithMessage(w http.ResponseWriter, r *http.Request, message string)
Handle404WithMessage returns a 404 NotFound error page with a custom message.
func Handle405 ¶
func Handle405(w http.ResponseWriter, r *http.Request)
Handle405 returns a 405 MethodNotAllowed error page.
func Handle500 ¶
func Handle500(w http.ResponseWriter, r *http.Request, message string)
Handle500 returns a 500 InternalServerError page.
func HandleHTTPError ¶
HandleHTTPError returns an error page with the given properties. The page might be returned as html or not.
func HandleOIDCError ¶
func HandleOIDCError(w http.ResponseWriter, r *http.Request, err oidc.OpenIDError, code int)
HandleOIDCError returns an error page with an OpenIDError.
func RegisterMiddleware ¶
RegisterMiddleware registers middlewares
func RegisterServerRoutes ¶
RegisterServerRoutes registers routes on the server
Types ¶
This section is empty.