middlewares

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2016 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthRequired

func AuthRequired(
	getAuthToken authRequiredDependencyGetAuthToken,
	authTokenLifetime time.Duration,
) gin.HandlerFunc

AuthRequired checks if user is authorized

func CORS

func CORS() gin.HandlerFunc

CORS allow cross domain resources sharing

func ErrorWriter

func ErrorWriter() gin.HandlerFunc

ErrorWriter writes last error into response body if not written yet

func LoggerWithLogger

func LoggerWithLogger(out *log.Logger, notlogged ...string) gin.HandlerFunc

LoggerWithLogger instance a Logger middleware with a *log.Logger

Types

This section is empty.

Jump to

Keyboard shortcuts

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