router

package
v0.0.0-...-8ec9993 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2018 License: AGPL-3.0 Imports: 8 Imported by: 5

Documentation

Index

Constants

View Source
const (
	GET     = "GET"
	POST    = "POST"
	PUT     = "PUT"
	DELETE  = "DELETE"
	HEAD    = "HEAD"
	PATCH   = "PATCH"
	OPTIONS = "OPTIONS"

	PathTag = "path"
	PermTag = "perm"
)

Variables

This section is empty.

Functions

func BindRequest

func BindRequest(c *gin.Context, obj interface{}) error

func GroupUse

func GroupUse(g string, middlewares ...gin.HandlerFunc)

func RegisterController

func RegisterController(c controller.Controller, middlewares ...gin.HandlerFunc) error

func RegisterControllerGroup

func RegisterControllerGroup(c controller.Controller, g string, middlewares ...gin.HandlerFunc) error

func RoutePerm

func RoutePerm(f gin.HandlerFunc) string

func RoutePerms

func RoutePerms() map[interface{}]string

func Static

func Static(relativePath, root string) gin.IRoutes

func StaticFS

func StaticFS(relativePath string, fs http.FileSystem) gin.IRoutes

func StaticFile

func StaticFile(relativePath, filepath string) gin.IRoutes

映射几个gin的方法出来

func Use

func Use(middlewares ...gin.HandlerFunc)

Types

type Request

type Request struct {
}

type Response

type Response struct {
}

type RouterComponent

type RouterComponent struct {
}

func (RouterComponent) Init

func (c RouterComponent) Init(options ...interface{}) error

type RouterConfig

type RouterConfig struct {
	Addr  string
	Mode  string
	Pprof bool
	Host  string
}
var (
	GlobalRouterConfig RouterConfig

	GlobalRouter *gin.Engine
)

Jump to

Keyboard shortcuts

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