middleware

package
v0.0.0-...-aff3c52 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ASCIIDoc

func ASCIIDoc(ctx *fasthttp.RequestCtx) bool

ASCIIDoc is a Middleware handler to catch AsciiDoc files

func File

func File(ctx *fasthttp.RequestCtx) bool

File serves the file if it exists

func HTTPLog

func HTTPLog(ctx *fasthttp.RequestCtx) bool

HTTPLog logs HTTP requests

func HandleMiddlewares

func HandleMiddlewares(ms []Middleware) func(ctx *fasthttp.RequestCtx)

HandleMiddlewares returns a pure fasthttp handler that simply goes through every middleware in order

func MarkDown

func MarkDown(ctx *fasthttp.RequestCtx) bool

MarkDown is a Middleware handler to catch MarkDown files

func Safe

func Safe(ctx *fasthttp.RequestCtx) bool

Safe refuses to continue if the path is deemed unsafe

Types

type Middleware

type Middleware func(ctx *fasthttp.RequestCtx) bool

Middleware is a function that takes a RequestCtx and returns a Bool (continue or not)

Jump to

Keyboard shortcuts

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