server

package
v0.0.0-...-537d0aa Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BodyRequestParser

func BodyRequestParser(next http.Handler) http.Handler

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

func CookieParser(next http.Handler) http.Handler

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

type AppConfig

type AppConfig = config.AppConfig

CreateSubrouter creates a subrouter for a given path and attaches it to the main router.

Jump to

Keyboard shortcuts

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