middlewares

package
v2.1.62 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const ServerIP = "X-Server-IP"

Variables

This section is empty.

Functions

func CORS added in v2.0.30

func CORS() gin.HandlerFunc

func Error

func Error() gin.HandlerFunc

func Jwt

func PersonalAccessToken added in v2.0.30

func PersonalAccessToken(gdb *gorm.DB) gin.HandlerFunc

func RBAC

func RBAC(e *casbin.Enforcer) gin.HandlerFunc

func RateLimit added in v2.1.56

func RateLimit(fillInterval time.Duration, capacity, quantum int64) gin.HandlerFunc

func Server added in v2.1.57

func Server() gin.HandlerFunc

Types

type ErrorResponse

type ErrorResponse struct {
	Message     string `json:"message,omitempty"`
	Error       string `json:"error,omitempty"`
	DocumentURL string `json:"document_url,omitempty"`
}

Jump to

Keyboard shortcuts

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