kgin

package module
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: MIT Imports: 18 Imported by: 1

README

kgin

Go Report Card

gin 相关工具.

TODO

  • log 改 slog
  • 缓存
    • redis
    • Cache
  • 代理
    • node SSR

License

© ender, 2023~time.Now

MIT LICENSE

Documentation

Index

Constants

View Source
const (
	CacheControl = "Cache-Control"
	MaxAge1y     = "public, max-age=31536000"
	ContentType  = "Content-Type"
)

Variables

This section is empty.

Functions

func Default added in v1.0.2

func Default() *gin.Engine

func DirHandler added in v1.0.6

func DirHandler(urlPrefix string, dir string) gin.HandlerFunc

DirHandler 目录读取.

func Embed added in v1.0.14

func Embed(group *gin.RouterGroup, fsys embed.FS, dir string) error

func HTMLHandler

func HTMLHandler(html string) gin.HandlerFunc

func LogHandler

func LogHandler(ctx *gin.Context)

func RecoveryHandler added in v1.0.5

func RecoveryHandler(ctx *gin.Context)

func StaticHandler added in v1.0.2

func StaticHandler(fsys fs.FS, dirs ...string) gin.HandlerFunc

StaticHandler fs.

Types

This section is empty.

Directories

Path Synopsis
_example
web
kv

Jump to

Keyboard shortcuts

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