Documentation
¶
Index ¶
- func Engine(debug bool) *gin.Engine
- func Group(relativePath string, handlers ...gin.HandlerFunc) *gin.RouterGroup
- func NewWriter(w http.ResponseWriter) (io.Writer, error)
- func NoRoute(handlers ...gin.HandlerFunc) *gin.Engine
- func Recovery() gin.HandlerFunc
- func Server(addr string, options ...Option)
- func Static(root, prefix string)
- func StaticEmbed(efs embed.FS, prefix, subdir string)
- func StaticIndex(root, prefix string)
- func StaticServe(hfs http.FileSystem, prefix string) gin.HandlerFunc
- func Use(middleware ...gin.HandlerFunc) gin.IRoutes
- type Config
- type Option
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Group ¶
func Group(relativePath string, handlers ...gin.HandlerFunc) *gin.RouterGroup
func NewWriter ¶
func NewWriter(w http.ResponseWriter) (io.Writer, error)
NewWriter 初始化 SSE 响应头并返回按 data 事件写入的 writer。
func NoRoute ¶
func NoRoute(handlers ...gin.HandlerFunc) *gin.Engine
func StaticServe ¶
func StaticServe(hfs http.FileSystem, prefix string) gin.HandlerFunc
StaticServe 静态文件服务处理器
func Use ¶
func Use(middleware ...gin.HandlerFunc) gin.IRoutes
Types ¶
type Config ¶
Source Files
¶
- engine.go
- recovery.go
- server.go
- sse.go
- static.go
Click to show internal directories.
Click to hide internal directories.