middleware

package
v0.0.0-...-5217b34 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2019 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAdmin

func IsAdmin(c *gin.Context)

IsAdmin is a middleware that check if the token is valid and if the client is an administrator id := c.MustGet("id").(string) to get the setting value by gin-gonic

func IsAuthorized

func IsAuthorized(c *gin.Context)

IsAuthorized is a middleware that check if the token is valid id := c.MustGet("id").(string) to get the setting value by gin-gonic

Types

This section is empty.

Jump to

Keyboard shortcuts

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