route

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultRoutesCacheSize = 100

Functions

This section is empty.

Types

type Route

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

func NewRoute

func NewRoute(cfg config.Route) (*Route, error)

func (*Route) Match

func (r *Route) Match(method, path []byte) bool

type Routes

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

func NewRoutes

func NewRoutes(cfg config.Config) (*Routes, error)

func (Routes) CachedRoute

func (rs Routes) CachedRoute(method, path []byte) *RoutesResult

func (Routes) CachedRouteCtx

func (rs Routes) CachedRouteCtx(ctx *fasthttp.RequestCtx) *RoutesResult

func (Routes) Route

func (rs Routes) Route(method, path []byte) *RoutesResult

type RoutesResult

type RoutesResult struct {
	StatusCode        int
	StatusMessage     []byte
	RewriteURI        []byte
	RedirectURI       []byte
	AppendQueryString bool
	Handler           string
	Filters           []string
}

func (RoutesResult) RedirectURIWithQueryString

func (r RoutesResult) RedirectURIWithQueryString(ctx *fasthttp.RequestCtx) []byte

func (RoutesResult) RewriteURIWithQueryString

func (r RoutesResult) RewriteURIWithQueryString(ctx *fasthttp.RequestCtx) []byte

Jump to

Keyboard shortcuts

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