handler

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFSHandler

func NewFSHandler(cfg tree.Map) (fasthttp.RequestHandler, error)

func NewHandler

func NewHandler(cfg tree.Map) (fasthttp.RequestHandler, error)

func NewProxyHandler

func NewProxyHandler(cfg tree.Map) (fasthttp.RequestHandler, error)

func RegisterNewHandlerFunc

func RegisterNewHandlerFunc(t string, fn NewHandlerFunc)

Types

type ErrorPages

type ErrorPages struct {
	// contains filtered or unexported fields
}

func NewErrorPages

func NewErrorPages(root string, cfg map[string]string) *ErrorPages

func (*ErrorPages) Handle

func (p *ErrorPages) Handle(ctx *fasthttp.RequestCtx)

type MainHandler

type MainHandler struct {
	// contains filtered or unexported fields
}

func NewMainHandler

func NewMainHandler(cfg config.Config) (*MainHandler, error)

func (*MainHandler) Close added in v0.0.2

func (h *MainHandler) Close() error

func (*MainHandler) Handle

func (h *MainHandler) Handle(ctx *fasthttp.RequestCtx)

Handle handles requests.

func (*MainHandler) HandleError

func (h *MainHandler) HandleError(ctx *fasthttp.RequestCtx, err error)

HandleError implements fasthttp.Server.ErrorHandler.

type NewHandlerFunc

type NewHandlerFunc func(cfg tree.Map) (fasthttp.RequestHandler, error)

type ProxyHandler

type ProxyHandler struct {
	URL string
}

Jump to

Keyboard shortcuts

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