coco/router.go

21 lines
401 B
Go
Raw Normal View History

2023-10-13 22:30:29 +08:00
package coco
2023-03-12 21:14:12 +08:00
2023-03-13 00:16:52 +08:00
import "github.com/gin-gonic/gin"
2023-03-12 21:14:12 +08:00
type RouterNode struct {
2023-03-13 00:16:52 +08:00
API string
Method string
Author string
Describe string
Middlewares []gin.HandlerFunc // 单一路由中间件组
2023-03-12 21:14:12 +08:00
}
type RouterMap map[string]*RouterNode
type Routers struct {
2023-03-13 00:16:52 +08:00
StructName string
BaseURL string
Apis RouterMap
Middlewares []gin.HandlerFunc // 路由组统一中间件
2023-03-12 21:14:12 +08:00
}