ginlimiter

package
v0.0.0-...-bab586e Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Unlimited = -1
	MIN       = 0.000001
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	// contains filtered or unexported fields
}

func NewFilter

func NewFilter(service UserService, handler LimitHandler) *Filter

func (*Filter) FilterHandler

func (f *Filter) FilterHandler(ctx *gin.Context)

type LimitHandler

type LimitHandler interface {
	OnLimited(ctx *gin.Context)
}

type UserService

type UserService interface {
	LoadUserByUsername(ctx *gin.Context) (user.Details, error)
}

Jump to

Keyboard shortcuts

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