Documentation
¶
Index ¶
- func FormatRoute(method string, path string) string
- type Engine
- type ResourceScope
- type ResourceType
- type RouterGroupWrapper
- func (rg RouterGroupWrapper) DELETE(relativePath string, typ ResourceType, handlers ...gin.HandlerFunc) gin.IRoutes
- func (rg RouterGroupWrapper) GET(relativePath string, typ ResourceType, handlers ...gin.HandlerFunc) gin.IRoutes
- func (rg RouterGroupWrapper) Group(relativePath string, handlers ...gin.HandlerFunc) RouterGroupWrapper
- func (rg RouterGroupWrapper) PATCH(relativePath string, typ ResourceType, handlers ...gin.HandlerFunc) gin.IRoutes
- func (rg RouterGroupWrapper) POST(relativePath string, typ ResourceType, handlers ...gin.HandlerFunc) gin.IRoutes
- func (rg RouterGroupWrapper) PUT(relativePath string, typ ResourceType, handlers ...gin.HandlerFunc) gin.IRoutes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatRoute ¶
Types ¶
type Engine ¶
type Engine struct {
*gin.Engine
Routers map[string]ResourceType
// contains filtered or unexported fields
}
func (*Engine) Group ¶
func (e *Engine) Group(relativePath string, handlers ...gin.HandlerFunc) RouterGroupWrapper
type ResourceType ¶
type ResourceType struct {
// Scope is the scope of the resource.
Scope ResourceScope `json:"scope"`
// Resource is the resource name.
Resource string `json:"resource"`
}
ResourceType used to bind API
type RouterGroupWrapper ¶
type RouterGroupWrapper struct {
*gin.RouterGroup
// contains filtered or unexported fields
}
func (RouterGroupWrapper) DELETE ¶
func (rg RouterGroupWrapper) DELETE(relativePath string, typ ResourceType, handlers ...gin.HandlerFunc) gin.IRoutes
func (RouterGroupWrapper) GET ¶
func (rg RouterGroupWrapper) GET(relativePath string, typ ResourceType, handlers ...gin.HandlerFunc) gin.IRoutes
func (RouterGroupWrapper) Group ¶
func (rg RouterGroupWrapper) Group(relativePath string, handlers ...gin.HandlerFunc) RouterGroupWrapper
func (RouterGroupWrapper) PATCH ¶
func (rg RouterGroupWrapper) PATCH(relativePath string, typ ResourceType, handlers ...gin.HandlerFunc) gin.IRoutes
func (RouterGroupWrapper) POST ¶
func (rg RouterGroupWrapper) POST(relativePath string, typ ResourceType, handlers ...gin.HandlerFunc) gin.IRoutes
func (RouterGroupWrapper) PUT ¶
func (rg RouterGroupWrapper) PUT(relativePath string, typ ResourceType, handlers ...gin.HandlerFunc) gin.IRoutes
Click to show internal directories.
Click to hide internal directories.