size_limiter

package
v0.9.12 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilSizeLimiter = errors.New("size limiter is nil")
)

Functions

This section is empty.

Types

type Middleware

type Middleware struct{}

Middleware struct is the size limiter middleware

func NewMiddleware

func NewMiddleware() *Middleware

NewMiddleware returns a new instance of the size limiter middleware

func (*Middleware) Limit

func (m *Middleware) Limit(bytesSizeLimit int64) func(next http.Handler) http.Handler

Limit is the size limiter middleware

type SizeLimiter

type SizeLimiter interface {
	Limit(bytesSizeLimit int64) func(next http.Handler) http.Handler
}

SizeLimiter is the interface for the size limiter middleware

Jump to

Keyboard shortcuts

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