ctx

package
v8.2.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package ctx 自定义路由

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CTX

type CTX struct {
	R *http.Request
	W http.ResponseWriter
	P types.Route
}

type Handler

type Handler interface {
	Handle(*CTX)
}

type HandlerFunc

type HandlerFunc func(*CTX)

func (HandlerFunc) Handle

func (f HandlerFunc) Handle(c *CTX)

type Router

type Router = mux.RouterOf[Handler]

func NewRouter

func NewRouter(name string, o ...mux.Option) *Router

NewRouter 声明适用于官方 http.Handler 接口的路由

type Routers

type Routers = group.GroupOf[Handler]

func NewRouters

func NewRouters(o ...mux.Option) *Routers

Jump to

Keyboard shortcuts

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