Documentation ¶
Index ¶
- Constants
- func Default() *gin.Engine
- func DirHandler(urlPrefix string, dir string) gin.HandlerFunc
- func Embed(group *gin.RouterGroup, fsys embed.FS, dir string) error
- func HTMLHandler(html string) gin.HandlerFunc
- func LogHandler(ctx *gin.Context)
- func RecoveryHandler(ctx *gin.Context)
- func StaticHandler(fsys fs.FS, dirs ...string) gin.HandlerFunc
Constants ¶
View Source
const ( CacheControl = "Cache-Control" MaxAge1y = "public, max-age=31536000" ContentType = "Content-Type" )
Variables ¶
This section is empty.
Functions ¶
func DirHandler ¶ added in v1.0.6
func DirHandler(urlPrefix string, dir string) gin.HandlerFunc
DirHandler 目录读取.
func HTMLHandler ¶
func HTMLHandler(html string) gin.HandlerFunc
func LogHandler ¶
func RecoveryHandler ¶ added in v1.0.5
func StaticHandler ¶ added in v1.0.2
func StaticHandler(fsys fs.FS, dirs ...string) gin.HandlerFunc
StaticHandler fs.
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.