handlerfunc

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 7 Imported by: 0

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

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

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

func BrowserRefreshFS

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

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