_router

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RouterList []*Router = []*Router{}

Functions

func Any

func Any(rule string, call func(ctx *_context.Context))

func Delete

func Delete(rule string, call func(ctx *_context.Context))

func Get

func Get(rule string, call func(ctx *_context.Context))

func Group

func Group(group func())
func Head(rule string, call func(ctx *_context.Context))

func Method

func Method(method string, rule string, call func(ctx *_context.Context))

func MethodList

func MethodList(methodList []string, rule string, call func(ctx *_context.Context))

func MiddlewareAfter

func MiddlewareAfter(middleware func(ctx *_context.Context)) *router

func MiddlewareAfterList

func MiddlewareAfterList(middlewareList []func(ctx *_context.Context)) *router

func MiddlewareBefore

func MiddlewareBefore(middleware func(ctx *_context.Context)) *router

func MiddlewareBeforeList

func MiddlewareBeforeList(middlewareList []func(ctx *_context.Context)) *router

func Options

func Options(rule string, call func(ctx *_context.Context))

func Patch

func Patch(rule string, call func(ctx *_context.Context))

func Post

func Post(rule string, call func(ctx *_context.Context))

func Prefix

func Prefix(prefix string) *router

func Put

func Put(rule string, call func(ctx *_context.Context))

Types

type Router

type Router struct {
	Rule                 string
	Call                 func(ctx *_context.Context)
	MethodList           []string
	MiddlewareBeforeList []func(ctx *_context.Context)
	MiddlewareAfterList  []func(ctx *_context.Context)
	ParameterList        []string
	IsRegexp             bool
}

Jump to

Keyboard shortcuts

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