handlers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UsernameContextKey = usernameContext("username")

UsernameContextKey - identify the http Context for the username that is passed into handlers

Functions

func AuthMiddleware

func AuthMiddleware(next http.Handler) http.Handler

AuthMiddleware - ensure valid access token is passed for API routes that require authentication

func ForwarderHandler

func ForwarderHandler(w http.ResponseWriter, r *http.Request)

ForwarderHandler - perform the short URL HTTP redirects on the / route

func SetUpAuthHandlers

func SetUpAuthHandlers(subrouter *mux.Router) error

SetUpAuthHandlers - set up the /api/auth REST handlers

func SetUpUrlsHandlers

func SetUpUrlsHandlers(subrouter *mux.Router) error

SetUpUrlsHandlers - set up the /urls REST handlers

Types

This section is empty.

Jump to

Keyboard shortcuts

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