server

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
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

func HandleHTTPError(w http.ResponseWriter, r *http.Request, message string, code int)

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

func RegisterMiddleware(r *mux.Router)

RegisterMiddleware registers middlewares

func RegisterServerRoutes

func RegisterServerRoutes(r *mux.Router)

RegisterServerRoutes registers routes on the server

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL