Back to

Package ginHelper

Latest Go to latest

The highest tagged major version is .

Published: Dec 30, 2019 | License: MIT | Module:



var GenHandlerFunc gin.HandlerFunc = nil

func Build

func Build(h interface{}, r gin.IRoutes)

type Param

type Param struct {
	Err error       //存储内部产生的错误
	Ret interface{} //存储返回的结构体

func (*Param) AfterBind

func (param *Param) AfterBind(c *gin.Context)

func (*Param) BeforeBind

func (param *Param) BeforeBind(c *gin.Context)

func (*Param) Bind

func (param *Param) Bind(c *gin.Context, p Parameter)

func (*Param) Error

func (param *Param) Error() error

func (*Param) Result

func (param *Param) Result(c *gin.Context)

func (*Param) Service

func (param *Param) Service()

type Parameter

type Parameter interface {
	Error() error                     //错误返回
	BeforeBind(c *gin.Context)        //绑定参数前的操作
	Bind(c *gin.Context, p Parameter) //绑定参数
	AfterBind(c *gin.Context)         //绑定参数后操作
	Service()                         //执行具体业务
	Result(c *gin.Context)            //结果返回

type Router

type Router struct {
	Param    Parameter
	Path     string
	Method   string
	Handlers []gin.HandlerFunc

func (*Router) AddHandler

func (rt *Router) AddHandler(r gin.IRoutes)

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier