middleware

package
v0.0.0-...-95bb65c Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2022 License: ISC Imports: 10 Imported by: 0

Documentation

Overview

Package middleware defines all the middlewares for the application

Index

Constants

View Source
const UserIDKey = "UserID"

Variables

View Source
var SessionIdentifierKey = "SESSION_IDENTIFIER"

Functions

func Auth

func Auth() gin.HandlerFunc

func Cache

func Cache() gin.HandlerFunc

func General

func General() gin.HandlerFunc

General handles the default headers that should be present in every response

func NoAuth

func NoAuth() gin.HandlerFunc

NoAuth is for routes that can only be accessed when the user is unauthenticated

func Sensitive

func Sensitive() gin.HandlerFunc

Sensitive middleware handles headers that should be set for routes that may contain sensitive data such as personal information

func Session

func Session(db *gorm.DB) gin.HandlerFunc

func Throttle

func Throttle(limit int) 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