middleware

package
v0.0.0-...-1ddd89f Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindJSON

func BindJSON(c *gin.Context, obj interface{}) error

BindJSON binds a json reuqest to the obj

func CorsWrapper

func CorsWrapper(corsAllowedOrigins []string) gin.HandlerFunc

CorsWrapper handles preflight requests for allowed origins

func GetAppContext

func GetAppContext(c *gin.Context) *system.AppContext

GetAppContext retrives an AppContext object from the context

func GetCurrentUser

func GetCurrentUser(c *gin.Context) *model.User

GetCurrentUser returns current authenticated user from context

func SetAppContextWrapper

func SetAppContextWrapper(appContext *system.AppContext) gin.HandlerFunc

SetAppContextWrapper sets an AppContext object to the context

func SetCurrentUser

func SetCurrentUser(appContext *system.AppContext) gin.HandlerFunc

SetCurrentUser sets current authenticated user from authorization header

Types

This section is empty.

Jump to

Keyboard shortcuts

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