router

package
v0.0.0-...-304ffbb Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logger

func Logger() gin.HandlerFunc

func Recovery

func Recovery() gin.HandlerFunc

func RegisterAll

func RegisterAll(group *gin.RouterGroup)

func RegisterHealth

func RegisterHealth(group *gin.RouterGroup)

RegisterHealth is the sub-router for health

Types

type GinRouter

type GinRouter struct {
	Engine *gin.Engine
}

func (*GinRouter) Register

func (gr *GinRouter) Register()

func (*GinRouter) Run

func (gr *GinRouter) Run(addr ...string) error

func (*GinRouter) ServeHTTP

func (gr *GinRouter) ServeHTTP(w http.ResponseWriter, req *http.Request)

func (*GinRouter) Swagger

func (gr *GinRouter) Swagger()

func (*GinRouter) Use

func (gr *GinRouter) Use(middleware ...gin.HandlerFunc)

type Router

type Router interface {
	http.Handler
	Use(middleware ...gin.HandlerFunc)
	ServeHTTP(w http.ResponseWriter, req *http.Request)
	Register()
	Run(addr ...string) error
}

func NewGinRouter

func NewGinRouter() Router

Jump to

Keyboard shortcuts

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