middlewares

package
v0.0.0-...-a58c836 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2025 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(c *gin.Context)

Auth is a middleware that checks if the user is logged in. if token is empty, set user to guest

func AuthAdmin

func AuthAdmin(c *gin.Context)

func AuthNotGuest

func AuthNotGuest(c *gin.Context)

func Authn

func Authn(c *gin.Context)

func Down

func Down(verifyFunc func(string, string) error) func(c *gin.Context)

func DownloadRateLimiter

func DownloadRateLimiter(limiter stream.Limiter) gin.HandlerFunc

func ForceHttps

func ForceHttps(c *gin.Context)

func FsUp

func FsUp(c *gin.Context)

func MaxAllowed

func MaxAllowed(n int) gin.HandlerFunc

func SearchIndex

func SearchIndex(c *gin.Context)

func StoragesLoaded

func StoragesLoaded(c *gin.Context)

func UploadRateLimiter

func UploadRateLimiter(limiter stream.Limiter) gin.HandlerFunc

Types

type ResponseWriterWrapper

type ResponseWriterWrapper struct {
	gin.ResponseWriter
	WrapWriter io.Writer
}

func (*ResponseWriterWrapper) Write

func (w *ResponseWriterWrapper) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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