@@ -9,12 +9,12 @@ import (
99
1010// Entry 路由条目
1111type Entry struct {
12- Name string `json:"name ,omitempty"`
12+ Domain string `json:"domain ,omitempty"`
1313 Resource string `json:"resource,omitempty"`
14- Method string `json:"method,omitempty"`
1514 Path string `json:"path,omitempty"`
15+ Method string `json:"method,omitempty"`
16+ Name string `json:"name,omitempty"`
1617 Protected bool `json:"protected"`
17- Desc string `json:"desc,omitempty"`
1818 Labels map [string ]string `json:"labels,omitempty"`
1919}
2020
@@ -43,8 +43,8 @@ type Router interface {
4343 // SetLabel 设置路由标签, 作用于Entry上
4444 SetLabel (... * Label )
4545
46- // 生成子路由实例
47- SubRouter (namespace string ) SubRouter
46+ // 子路由
47+ SubRouter (domainName string ) SubRouter
4848}
4949
5050// SubRouter 子路由或者分组路由
@@ -59,4 +59,6 @@ type SubRouter interface {
5959 With (m ... Middleware ) SubRouter
6060 // SetLabel 设置子路由标签, 作用于Entry上
6161 SetLabel (... * Label )
62+ // // ResourceRouter 资源路由器
63+ // ResourceRouter(resourceName string) SubRouter
6264}
0 commit comments