middleware

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticate

func Authenticate(publicKey crypto.PublicKey) echo.MiddlewareFunc

func RateLimit added in v1.0.5

func RateLimit(count int, period time.Duration) echo.MiddlewareFunc

func SuperAdmin added in v1.0.4

func SuperAdmin() echo.MiddlewareFunc

Types

type Claims added in v1.0.7

type Claims struct {
	jwt.RegisteredClaims
	SessionID  string `json:"sid,omitempty"`
	SuperAdmin bool   `json:"adm,omitempty"`
}

type RateLimiterRedisStore added in v1.0.5

type RateLimiterRedisStore struct {
	Count  int
	Period time.Duration
}

func (RateLimiterRedisStore) Allow added in v1.0.5

func (r RateLimiterRedisStore) Allow(identifier string) (bool, error)

Jump to

Keyboard shortcuts

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