middlewares

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicAuth

func BasicAuth() gin.HandlerFunc

BasicAuth BasicAuth BasicAuth

func Configs

func Configs(conf *configs.Configs) gin.HandlerFunc

Configs Configs with Viper Viper is a complete configuration solution for Go applications including 12-Factor apps. It is designed to work within an application, and can handle all types of configuration needs and formats. It supports: setting defaults reading from JSON, TOML, YAML, HCL, envfile and Java properties config files live watching and re-reading of config files (optional) reading from environment variables reading from remote config systems (etcd or Consul), and watching changes reading from command line flags reading from buffer setting explicit values Viper can be thought of as a registry for all of your applications configuration needs.

func Cors

func Cors() gin.HandlerFunc

Cors cors

func CustomErrorHandler

func CustomErrorHandler(c *gin.Context, err error)

CustomErrorHandler is the Custom ErrorHandler used by a new Middleware.

func CustomLimitReachedHandler

func CustomLimitReachedHandler(c *gin.Context)

CustomLimitReachedHandler is the Custom LimitReachedHandler used by a new Middleware.

func Empty

func Empty() gin.HandlerFunc

Empty Empty

func Gzip

func Gzip() gin.HandlerFunc

Gzip Gzip

func Header() gin.HandlerFunc

Header Header

func LoggerWithFormatter

func LoggerWithFormatter() gin.HandlerFunc

LoggerWithFormatter instance a Logger middleware with the specified log format function.

func RateLimiter

func RateLimiter() gin.HandlerFunc

RateLimiter RateLimiter

func Referer

func Referer() gin.HandlerFunc

Referer Referer

Types

This section is empty.

Jump to

Keyboard shortcuts

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