1 Star 0 Fork 0

csingo / cServer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
RouteConf.go 1015 Bytes
一键复制 编辑 原始数据 按行查看 历史
joe 提交于 2024-02-20 18:24 . update
package cServer
const RouteConfigName = "RouteConf"
type RouteType int
const (
RouteTypeNil RouteType = iota
RouteTypeApi
RouteTypeFile
RouteTypeDir
RouteTypeView
RouteTypeGrpc
)
type RouteConf struct {
Type RouteType `json:"type"`
Path string `json:"path"`
Method []string `json:"method"`
Target string `json:"target"`
App string `json:"app"`
Controller string `json:"controller"`
Function string `json:"function"`
Middlewares *RouteConf_Middlewares `json:"middlewares"`
Routes []*RouteConf `json:"routes"`
}
type RouteConf_Middlewares struct {
Prefix []*RouteConf_Middleware `json:"prefix"`
Suffix []*RouteConf_Middleware `json:"suffix"`
}
type RouteConf_Middleware struct {
App string `json:"app"`
Name string `json:"name"`
}
func (i *RouteConf) ConfigName() string {
return RouteConfigName
}
var route_config = &RouteConf{}
Go
1
https://gitee.com/csingo/cServer.git
git@gitee.com:csingo/cServer.git
csingo
cServer
cServer
v0.4.3

搜索帮助