middleware

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package middleware contains useful middleware handlers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowAnyOrigin

func AllowAnyOrigin() gin.HandlerFunc

AllowAnyOrigin enables CORS for all origins testing purposes

func AllowUSPYOrigin

func AllowUSPYOrigin() gin.HandlerFunc

AllowUSPYOrigin enables CORS for the Frontend, according to dev/prod environment variables

func Bind

func Bind(name string, data interface{}, bindingType binding.Binding) gin.HandlerFunc

Bind takes a binder and returns a middleware function

func DefineDomain

func DefineDomain() gin.HandlerFunc

DefineDomain is a middleware for setting the cookie domain values

func DumpErrors

func DumpErrors() gin.HandlerFunc

DumpErrors is a middleware for dumping all errors that are set in the context

func JWT

func JWT() gin.HandlerFunc

JWT is used to ensure authorization with the JWT Access Cookie.

func Logger

func Logger() gin.HandlerFunc

Logger is the middleware used for logging to stdout

It is very similar to the default gin logging middleware, but omits errors at the last line This logger is useful to use with a custom error dumping middleware

func RateLimiter

func RateLimiter(format string) gin.HandlerFunc

RateLimiter returns a middleware that sets up the rate limiting tool

Types

This section is empty.

Jump to

Keyboard shortcuts

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