ginroute

package
v0.0.0-...-d6a8468 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GinRecovery

func GinRecovery(recV interface{}, request *http.Request, args []interface{}) (resp interface{}, err error)

func NewGinServer

func NewGinServer() route.Server

Types

type CommonRespCtr

type CommonRespCtr struct {
	Code   int               `json:"-" plate:"code,resp"`
	Header map[string]string `json:"-" plate:"header,resp"`
}

type GinRequest

type GinRequest struct {
	// contains filtered or unexported fields
}

func NewGinRequest

func NewGinRequest(c *gin.Context) *GinRequest

func (*GinRequest) Params

func (g *GinRequest) Params() map[string][]string

func (*GinRequest) Request

func (g *GinRequest) Request() *http.Request

type GinRouter

type GinRouter struct {
	// contains filtered or unexported fields
}

func NewGinRouter

func NewGinRouter() *GinRouter

func (*GinRouter) AddMiddleAfter

func (g *GinRouter) AddMiddleAfter(handler route.Handler, v interface{})

AddMiddleAfter add after middle

func (*GinRouter) AddMiddleBefore

func (g *GinRouter) AddMiddleBefore(handler route.Handler, v interface{})

func (*GinRouter) Close

func (g *GinRouter) Close()

func (*GinRouter) Connect

func (g *GinRouter) Connect(path string, handler route.Handler, req interface{})

func (*GinRouter) Delete

func (g *GinRouter) Delete(path string, handler route.Handler, req interface{})

func (*GinRouter) Get

func (g *GinRouter) Get(path string, handler route.Handler, req interface{})

func (*GinRouter) Handle

func (g *GinRouter) Handle(method, path string, handler route.Handler, v interface{})

func (*GinRouter) Head

func (g *GinRouter) Head(path string, handler route.Handler, req interface{})

func (*GinRouter) Options

func (g *GinRouter) Options(path string, handler route.Handler, req interface{})

func (*GinRouter) Patch

func (g *GinRouter) Patch(path string, handler route.Handler, req interface{})

func (*GinRouter) Post

func (g *GinRouter) Post(path string, handler route.Handler, req interface{})

func (*GinRouter) Put

func (g *GinRouter) Put(path string, handler route.Handler, req interface{})

func (*GinRouter) SetAutoCors

func (g *GinRouter) SetAutoCors(isOpen bool)

func (*GinRouter) SetRecover

func (g *GinRouter) SetRecover(res route.Recover)

func (*GinRouter) Sub

func (g *GinRouter) Sub(relativePath string) route.Router

func (*GinRouter) Trace

func (g *GinRouter) Trace(path string, handler route.Handler, req interface{})

func (*GinRouter) Wait

func (g *GinRouter) Wait(timeout int)

type GinServer

type GinServer struct {
	Root *GinRouter
	// contains filtered or unexported fields
}

func (*GinServer) Close

func (g *GinServer) Close()

func (*GinServer) Route

func (g *GinServer) Route() route.Router

func (*GinServer) Run

func (g *GinServer) Run(addr ...string)

func (*GinServer) Wait

func (g *GinServer) Wait(timeout int)

type ReqMeta

type ReqMeta struct {
	Method    string `json:"method" plate:"method,mid"`
	Path      string `json:"path" plate:"path,mid"`
	ParamName string `json:"param_name" plate:"param_name,mid"`
}

Jump to

Keyboard shortcuts

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