middleware

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HeaderMiddleware

func HeaderMiddleware(next http.Handler) http.Handler

HeaderMiddleware sets default headers

func RequireAdmin

func RequireAdmin(next http.HandlerFunc) http.HandlerFunc

RequireAdmin only continues if the logged in user is an administrator

func WithSession

func WithSession(next http.HandlerFunc) http.HandlerFunc

WithSession requires the client to have a valid session (to be logged in)

func WithToken

func WithToken(next http.HandlerFunc) http.HandlerFunc

WithToken makes sure that, if enabled, a client must provide his API key within an HTTP header

Types

This section is empty.

Jump to

Keyboard shortcuts

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