Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GranadaServer ¶
type GranadaServer struct { // 服务接口基础路由组 ApiBase *gin.RouterGroup // 服务接口版本 ApiVersion *gin.RouterGroup // 路由信息 RGMap map[string]*RouterGroupInfo // 鉴权中间件 AuthMid *jwt.GinJWTMiddleware // contains filtered or unexported fields }
服务主体
func (*GranadaServer) AddGroup ¶
func (gs *GranadaServer) AddGroup(name, remarks string) *RouterGroupInfo
添加一个路由组
type RouterGroupInfo ¶
type RouterGroupInfo struct { // 备注 Remarks string // 路由组 GGroup *gin.RouterGroup // 路由 RouterInfo map[string]*RouterInfo // 子路由信息 ChildRouterGroup map[string]*RouterGroupInfo }
路由组信息
func (*RouterGroupInfo) AddGroup ¶
func (gpi *RouterGroupInfo) AddGroup(name, remarks string) *RouterGroupInfo
添加一个路由组
func (*RouterGroupInfo) AddRouter ¶
func (gpi *RouterGroupInfo) AddRouter(method Method, name, remarks string, Handler ...gin.HandlerFunc)
添加路由
type RouterInfo ¶
type RouterInfo struct { // 调用方法 Method Method // 备注 Remarks string // 对应方法 Handler []gin.HandlerFunc }
路由信息
Click to show internal directories.
Click to hide internal directories.