xgin

package
v1.27.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPath

func GetPath(ctx *gin.Context) string

GetPath 获取请求路径,支持full path

func SetEngine

func SetEngine(in *gin.Engine)

Types

type RouteInfo

type RouteInfo struct {
	Name string `json:"name"`
	Path string `json:"path"`
	Ext  any    `json:"ext"`
	// contains filtered or unexported fields
}

func Route

func Route(path, method string) *RouteInfo

func Routes

func Routes() []*RouteInfo

func (*RouteInfo) BaseName

func (info *RouteInfo) BaseName() string

func (*RouteInfo) BasePath

func (info *RouteInfo) BasePath() string

func (*RouteInfo) HandlerName

func (info *RouteInfo) HandlerName() string

func (*RouteInfo) Method

func (info *RouteInfo) Method() string

func (*RouteInfo) RealPath

func (info *RouteInfo) RealPath() string

type RouterGroup

type RouterGroup struct {
	Name  string
	Group *gin.RouterGroup
}

func (*RouterGroup) Any

func (group *RouterGroup) Any(info RouteInfo, handlers ...gin.HandlerFunc) gin.IRoutes

func (*RouterGroup) DELETE

func (group *RouterGroup) DELETE(info RouteInfo, handlers ...gin.HandlerFunc) gin.IRoutes

DELETE is a shortcut for router.Handle("DELETE", path, handle).

func (*RouterGroup) GET

func (group *RouterGroup) GET(info RouteInfo, handlers ...gin.HandlerFunc) gin.IRoutes

func (*RouterGroup) HEAD

func (group *RouterGroup) HEAD(info RouteInfo, handlers ...gin.HandlerFunc) gin.IRoutes

HEAD is a shortcut for router.Handle("HEAD", path, handle).

func (*RouterGroup) Handle

func (group *RouterGroup) Handle(httpMethod string, info RouteInfo, handlers ...gin.HandlerFunc) gin.IRoutes

func (*RouterGroup) OPTIONS

func (group *RouterGroup) OPTIONS(info RouteInfo, handlers ...gin.HandlerFunc) gin.IRoutes

OPTIONS is a shortcut for router.Handle("OPTIONS", path, handle).

func (*RouterGroup) PATCH

func (group *RouterGroup) PATCH(info RouteInfo, handlers ...gin.HandlerFunc) gin.IRoutes

PATCH is a shortcut for router.Handle("PATCH", path, handle).

func (*RouterGroup) POST

func (group *RouterGroup) POST(info RouteInfo, handlers ...gin.HandlerFunc) gin.IRoutes

func (*RouterGroup) PUT

func (group *RouterGroup) PUT(info RouteInfo, handlers ...gin.HandlerFunc) gin.IRoutes

PUT is a shortcut for router.Handle("PUT", path, handle).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL