data

package
v0.0.0-...-ded745d Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// RouterMap 用于初始化 http 路由的 map
	RouterMap = map[string]map[string]HttpRoute{}
)

Functions

func AddRoute

func AddRoute(method string, path string, handlers ...gin.HandlerFunc)

func AddRouteV2

func AddRouteV2(methods []string, paths []string, handlers ...gin.HandlerFunc)

func ForRange

func ForRange(f func(method, path string, handlers ...gin.HandlerFunc))

Types

type HttpRoute

type HttpRoute struct {
	// HTTP 方法
	Method string
	// HTTP 路径
	Path string
	// Handler 处理函数
	Handlers []gin.HandlerFunc
}

HttpRoute 记录路由

Jump to

Keyboard shortcuts

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