middleware

package
v0.0.0-...-f733064 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Log

func Log(format string, v ...any)

Log print

func PrintStat

func PrintStat(stat *requests.Stat) string

PrintStat is used for server side

func ServeLog

func ServeLog(f func(*requests.Stat)) func(http.Handler) http.Handler

func ServeStat

func ServeStat(ww *requests.ResponseWriter, r *http.Request, start time.Time, buf *bytes.Buffer) *requests.Stat

func ServeUpload

func ServeUpload(prefix string) http.HandlerFunc

ServeUpload serve upload handler. curl http://127.0.0.1:8080/_upload H 'Content-Type: multipart/form-data' -F '/abc/123=@xxx.txt' -F '456=@abc/xyz.txt' upload files is $perfix/abc/123/xxx.txt and $perfix/456/xyz.txt

func TraceLv

func TraceLv(v int, mLimit ...int) requests.Option

Types

This section is empty.

Jump to

Keyboard shortcuts

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