middleware

package
v0.0.0-...-bcd2c7c Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Authorization = "Authorization"
	RequestIdKey  = "X-Request-Id"
)

Variables

This section is empty.

Functions

func AuthMiddleware

func AuthMiddleware(tokenMaker token.Maker) gin.HandlerFunc

AuthMiddleware creates a gin middleware for authorization

func CheckRole

func CheckRole() gin.HandlerFunc

func InitMiddleware

func InitMiddleware(r *gin.Engine)

func Logger

func Logger() gin.HandlerFunc

func NoCache

func NoCache(c *gin.Context)

NoCache is a middleware function that appends headers to prevent the client from caching the HTTP response.

func Options

func Options(c *gin.Context)

Options is a middleware function that appends headers for options requests and aborts then exits the middleware chain and ends the request.

func RequestId

func RequestId() gin.HandlerFunc

func Secure

func Secure(c *gin.Context)

Secure is a middleware function that appends security and resource access headers.

func Sender

func Sender() gin.HandlerFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

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