Documentation ¶
Index ¶
- func CORSAccessControlAllowOrigin(r *mux.Router) mux.MiddlewareFunc
- func JwtAuthentication(next http.Handler, state *state.ServerState, ...) http.Handler
- type Handlers
- func (h *Handlers) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) SetupRoutes(router *mux.Router) error
- func (h *Handlers) WrapHandlerFunc(next routes.HandlerFunc) http.HandlerFunc
- func (h *Handlers) WrapMiddlewareFunc(next routes.MiddlewareFunc, registry map[string]routes.RouteEntry) mux.MiddlewareFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CORSAccessControlAllowOrigin ¶
func CORSAccessControlAllowOrigin(r *mux.Router) mux.MiddlewareFunc
func JwtAuthentication ¶
func JwtAuthentication(next http.Handler, state *state.ServerState, registry map[string]routes.RouteEntry) http.Handler
Types ¶
type Handlers ¶
type Handlers struct {
// contains filtered or unexported fields
}
func (*Handlers) ServeHTTP ¶
func (h *Handlers) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP inspects the URL path to locate a file within the static dir on the SPA handler. If a file is found, it will be served. If not, the file located at the index path on the SPA handler will be served. This is suitable behavior for serving an SPA (single page application).
func (*Handlers) SetupRoutes ¶
SetupRoutes add home route to mux
func (*Handlers) WrapHandlerFunc ¶
func (h *Handlers) WrapHandlerFunc(next routes.HandlerFunc) http.HandlerFunc
func (*Handlers) WrapMiddlewareFunc ¶
func (h *Handlers) WrapMiddlewareFunc(next routes.MiddlewareFunc, registry map[string]routes.RouteEntry) mux.MiddlewareFunc
Click to show internal directories.
Click to hide internal directories.