std

package
v9.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 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.BuildNodeHandler[http.Handler]

type Middleware

type Middleware = types.Middleware[http.Handler]

type MiddlewareFunc

type MiddlewareFunc = types.MiddlewareFunc[http.Handler]

type Prefix

type Prefix = mux.Prefix[http.Handler]

type Resource

type Resource = mux.Resource[http.Handler]

type Router

type Router = mux.Router[http.Handler]

func NewRouter

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

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

type Routers

type Routers = mux.Group[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