Documentation ¶
Index ¶
- func Auth() gin.HandlerFunc
- func CasbinHandler() gin.HandlerFunc
- func Cors() gin.HandlerFunc
- func ErrorHandling() gin.HandlerFunc
- func ErrorToMail() gin.HandlerFunc
- func Ip() gin.HandlerFunc
- func IpLimit() gin.HandlerFunc
- func Logging() gin.HandlerFunc
- func SSLRedirect() gin.HandlerFunc
- type RateLimiter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Auth ¶
func Auth() gin.HandlerFunc
func ErrorHandling ¶
func ErrorHandling() gin.HandlerFunc
func ErrorToMail ¶
func ErrorToMail() gin.HandlerFunc
func Ip ¶
func Ip() gin.HandlerFunc
func IpLimit ¶
func IpLimit() gin.HandlerFunc
func Logging ¶
func Logging() gin.HandlerFunc
func SSLRedirect ¶
func SSLRedirect() gin.HandlerFunc
Types ¶
type RateLimiter ¶
type RateLimiter struct {
// contains filtered or unexported fields
}
RateLimiter 定义限流器结构体
func NewRateLimiter ¶
func NewRateLimiter(fillInterval time.Duration, capacity int64) *RateLimiter
NewRateLimiter 创建并返回一个限流器实例
func (*RateLimiter) RateLimiterMiddleware ¶
func (r *RateLimiter) RateLimiterMiddleware() gin.HandlerFunc
RateLimiterMiddleware 限流中间件
Click to show internal directories.
Click to hide internal directories.