handlerfunc

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: MIT Imports: 6 Imported by: 1

README

handlerfunc

Commonly used public handlers.


Example of use

	r := gin.New()
	r.GET("/health", handlerfunc.CheckHealth)
	r.GET("/ping", handlerfunc.Ping)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BrowserRefresh added in v1.3.0

func BrowserRefresh(path string) func(c *gin.Context)

BrowserRefresh solve vue using history route 404 problem, for system file

func BrowserRefreshFS added in v1.3.0

func BrowserRefreshFS(fs embed.FS, path string) func(c *gin.Context)

BrowserRefreshFS solve vue using history route 404 problem, for embed.FS

func CheckHealth

func CheckHealth(c *gin.Context)

CheckHealth check healthy. @Summary check health @Description check health @Tags system @Accept json @Produce json @Success 200 {object} checkHealthResponse{} @Router /health [get]

func Ping

func Ping(c *gin.Context)

Ping ping @Summary ping @Description ping @Tags system @Accept json @Produce json @Router /ping [get]

Types

This section is empty.

Jump to

Keyboard shortcuts

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