ginext

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: Apache-2.0 Imports: 1 Imported by: 8

Documentation

Overview

Package ginext provides extensions for the Gin web framework.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context = gin.Context

Context is an alias for gin.Context.

type Engine

type Engine struct {
	*gin.Engine
}

Engine extends the standard Gin Engine.

func New

func New(ginMode string) *Engine

New creates a new Engine instance with the specified Gin mode.

func (*Engine) DELETE added in v0.0.4

func (e *Engine) DELETE(relativePath string, handlers ...HandlerFunc)

DELETE registers a handler for HTTP DELETE method on the Engine.

func (*Engine) GET

func (e *Engine) GET(relativePath string, handlers ...HandlerFunc)

GET registers a handler for HTTP GET method on the Engine.

func (*Engine) Group added in v0.0.4

func (e *Engine) Group(relativePath string, handlers ...HandlerFunc) *RouterGroup

Group creates a new route group.

func (*Engine) HEAD added in v0.0.4

func (e *Engine) HEAD(relativePath string, handlers ...HandlerFunc)

HEAD registers a handler for HTTP HEAD method on the Engine.

func (*Engine) LoadHTMLGlob added in v0.0.4

func (e *Engine) LoadHTMLGlob(pattern string)

LoadHTMLGlob loads HTML templates.

func (*Engine) OPTIONS added in v0.0.4

func (e *Engine) OPTIONS(relativePath string, handlers ...HandlerFunc)

OPTIONS registers a handler for HTTP OPTIONS method on the Engine.

func (*Engine) PATCH added in v0.0.4

func (e *Engine) PATCH(relativePath string, handlers ...HandlerFunc)

PATCH registers a handler for HTTP PATCH method on the Engine.

func (*Engine) POST added in v0.0.4

func (e *Engine) POST(relativePath string, handlers ...HandlerFunc)

POST registers a handler for HTTP POST method on the Engine.

func (*Engine) PUT added in v0.0.4

func (e *Engine) PUT(relativePath string, handlers ...HandlerFunc)

PUT registers a handler for HTTP PUT method on the Engine.

func (*Engine) Run

func (e *Engine) Run(addr ...string) error

Run starts the Gin server.

func (*Engine) Use added in v0.0.4

func (e *Engine) Use(middleware ...HandlerFunc)

Use attaches middleware to the Engine.

type H added in v0.0.4

type H = gin.H

H is an alias for gin.H.

type HandlerFunc added in v0.0.4

type HandlerFunc = gin.HandlerFunc

HandlerFunc is an alias for gin.HandlerFunc.

func Logger added in v0.0.4

func Logger() HandlerFunc

Logger returns the default Gin logger middleware.

func Recovery added in v0.0.4

func Recovery() HandlerFunc

Recovery returns the default Gin recovery middleware.

type RouterGroup added in v0.0.4

type RouterGroup struct {
	*gin.RouterGroup
}

RouterGroup groups related routes together.

func (*RouterGroup) DELETE added in v0.0.4

func (g *RouterGroup) DELETE(relativePath string, handlers ...HandlerFunc)

DELETE registers a handler for HTTP DELETE method on the RouterGroup.

func (*RouterGroup) GET added in v0.0.4

func (g *RouterGroup) GET(relativePath string, handlers ...HandlerFunc)

GET registers a handler for HTTP GET method on the RouterGroup.

func (*RouterGroup) HEAD added in v0.0.4

func (g *RouterGroup) HEAD(relativePath string, handlers ...HandlerFunc)

HEAD registers a handler for HTTP HEAD method on the RouterGroup.

func (*RouterGroup) OPTIONS added in v0.0.4

func (g *RouterGroup) OPTIONS(relativePath string, handlers ...HandlerFunc)

OPTIONS registers a handler for HTTP OPTIONS method on the RouterGroup.

func (*RouterGroup) PATCH added in v0.0.4

func (g *RouterGroup) PATCH(relativePath string, handlers ...HandlerFunc)

PATCH registers a handler for HTTP PATCH method on the RouterGroup.

func (*RouterGroup) POST added in v0.0.4

func (g *RouterGroup) POST(relativePath string, handlers ...HandlerFunc)

POST registers a handler for HTTP POST method on the RouterGroup.

func (*RouterGroup) PUT added in v0.0.4

func (g *RouterGroup) PUT(relativePath string, handlers ...HandlerFunc)

PUT registers a handler for HTTP PUT method on the RouterGroup.

func (*RouterGroup) Use added in v0.0.4

func (g *RouterGroup) Use(middleware ...HandlerFunc)

Use attaches middleware to the RouterGroup.

Jump to

Keyboard shortcuts

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