handler

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFS added in v0.1.0

func NewFS(cfg tree.Map) (*fasthttp.FS, error)

func NewFSHandler

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

func NewHandler

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

func NewProxyHandler

func NewProxyHandler(cfg tree.Map, l logger.Logger) (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.

func (*MainHandler) Logger added in v0.1.0

func (h *MainHandler) Logger() logger.Logger

type NewHandlerFunc

type NewHandlerFunc func(cfg tree.Map, l logger.Logger) (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