handlerfunc

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: MIT Imports: 7 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

Overview

Package handlerfunc is used for public http request handler.

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 ListCodes added in v1.5.2

func ListCodes(c *gin.Context)

ListCodes list error codes info @Summary list error codes info @Description list error codes info @Tags system @Accept json @Produce json @Router /codes [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