handlers

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ApiLimiter = limiter.New(limiter.Config{
	Max:        750,
	Expiration: 30 * time.Second,
	KeyGenerator: func(c *fiber.Ctx) string {
		return c.Get(fiber.HeaderXForwardedFor)
	},
	LimitReached: func(c *fiber.Ctx) error {
		return helpers.NewError(http.StatusTooManyRequests, helpers.WhereAmI(), http.StatusText(http.StatusTooManyRequests))
	},
})

Functions

func Index

func Index() fiber.Handler

Types

type RouterResources

type RouterResources struct {
	JwtKeyfunc jwt.Keyfunc
}

RouterResources DB handler

func NewRouterResources

func NewRouterResources(jwtKeyfunc jwt.Keyfunc) *RouterResources

NewRouterResources returns a new DBHandler

Jump to

Keyboard shortcuts

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