Documentation ¶
Index ¶
- func BasicAuth(username, password string) func(echo.HandlerFunc) echo.HandlerFunc
- func CORS(allowedOrigins string) echo.MiddlewareFunc
- func Monitoring() echo.MiddlewareFunc
- func NewErrorHandler() func(err error, c echo.Context)
- func RateLimiting(rpm uint16, options ...RateLimitingOption) echo.MiddlewareFunc
- func RequestLogger() func(echo.HandlerFunc) echo.HandlerFunc
- type RateLimitingOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Monitoring ¶
func Monitoring() echo.MiddlewareFunc
func NewErrorHandler ¶
func NewErrorHandler() func(err error, c echo.Context)
func RateLimiting ¶
func RateLimiting(rpm uint16, options ...RateLimitingOption) echo.MiddlewareFunc
func RequestLogger ¶
func RequestLogger() func(echo.HandlerFunc) echo.HandlerFunc
Types ¶
type RateLimitingOption ¶
type RateLimitingOption func(cfg *echomw.RateLimiterConfig)
func WithIP ¶
func WithIP() RateLimitingOption
WithIP extracts the id from the real ip. This functional option is passed to RateLimiting.
func WithUserID ¶
func WithUserID() RateLimitingOption
WithUserID extracts the id from the userId header. This functional option is passed to RateLimiting.
func WithUserIP ¶
func WithUserIP() RateLimitingOption
WithUserIP extracts the id from the userId header + real ip. This functional option is passed to RateLimiting.
Click to show internal directories.
Click to hide internal directories.