middleware

package
v1.17.0-go1.9 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	PrefixReqPath string
	VhostReqPath  string
	AliasReqPath  string
	AliasFsPath   string
	AliasFsRoot   string

	WantJson bool

	RestrictAccess bool
	AllowAccess    bool

	NeedAuth     bool
	AuthUserName string
	AuthSuccess  bool

	CanUpload  *bool
	CanMkdir   *bool
	CanDelete  *bool
	CanArchive *bool

	Status *int

	File     **os.File
	FileInfo *os.FileInfo

	Users  *user.List
	Logger *serverLog.Logger
}

type Middleware

type Middleware func(w http.ResponseWriter, r *http.Request, context *Context) (result ProcessResult)

type ProcessResult added in v1.15.3

type ProcessResult int
const (
	GoNext ProcessResult = iota
	SkipRests
	Outputted
)

Jump to

Keyboard shortcuts

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