Documentation
¶
Index ¶
- func BodyRequestParser(next http.Handler) http.Handler
- func CheckAllowedMethodsMiddleware(allowedMethods map[string]bool) mux.MiddlewareFunc
- func CookieParser(next http.Handler) http.Handler
- func CreateSubrouter(router *mux.Router, path string, ...)
- func TollboothMiddleware(lim *limiter.Limiter) mux.MiddlewareFunc
- type AppConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BodyRequestParser ¶
ParserBodyRequest is a middleware for parsing the request body globally
func CheckAllowedMethodsMiddleware ¶
func CheckAllowedMethodsMiddleware(allowedMethods map[string]bool) mux.MiddlewareFunc
CheckAllowedMethodsMiddleware is a custom middleware to check allowed request methods
func CookieParser ¶
CookieParser is a middleware that reads the user data from the cookie and attaches it to the request context for use in controllers
func CreateSubrouter ¶
func CreateSubrouter(router *mux.Router, path string, subrouterFunc func(awsInterface *aws.MethodInterface, emailInterface *email.RepositoryInterface, mongoDBInterface *mongodb.MethodInterface) *mux.Router, awsInterface *aws.MethodInterface, emailInterface *email.RepositoryInterface, mongoDBInterface *mongodb.MethodInterface)
func TollboothMiddleware ¶
func TollboothMiddleware(lim *limiter.Limiter) mux.MiddlewareFunc
TollboothMiddleware is a custom middleware that wraps Gorilla Mux router with tollbooth rate limiting
Types ¶
Click to show internal directories.
Click to hide internal directories.