std

package
v7.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package std 兼容标准库的路由

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetParams

func GetParams(r *http.Request) types.Route

GetParams 获取当前请求实例上的参数列表

func WithValue

func WithValue(r *http.Request, ps types.Route) *http.Request

WithValue 将参数 ps 附加在 r 上

与 context.WithValue 功能相同,但是考虑了在同一个 r 上调用多次 WithValue 的情况。

Types

type BuildNodeHandle

type BuildNodeHandle = types.BuildNodeHandleOf[http.Handler]

type Middleware

type Middleware = types.MiddlewareOf[http.Handler]

type MiddlewareFunc

type MiddlewareFunc = types.MiddlewareFuncOf[http.Handler]

type Prefix

type Prefix = mux.PrefixOf[http.Handler]

type Resource

type Resource = mux.ResourceOf[http.Handler]

type Router

type Router = mux.RouterOf[http.Handler]

func NewRouter

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

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

type Routers

type Routers = group.GroupOf[http.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