middleware

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LimitHandler

func LimitHandler(lmt *limiter.Limiter) gin.HandlerFunc

func LocalFile added in v0.3.0

func LocalFile(root string, indexes bool, indexFileName string, fs fs.FS) *localFileSystem

func SecurityMiddleware

func SecurityMiddleware(ctx context.Context) gin.HandlerFunc

func Serve added in v0.3.0

func Serve(urlPrefix string, fs ServeFileSystem) gin.HandlerFunc

Static returns a middleware handler that serves static files in the given directory.

Types

type ServeFileSystem added in v0.3.0

type ServeFileSystem interface {
	http.FileSystem
	Exists(prefix string, path string) bool
}

Jump to

Keyboard shortcuts

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