ginmodule

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const Sys_Event_Gin_Event event.EventType = -11

Variables

This section is empty.

Functions

func GetIPWithProxyHeaders

func GetIPWithProxyHeaders(c *gin.Context) string

func GetIPWithValidatedProxyHeaders

func GetIPWithValidatedProxyHeaders(c *gin.Context) string

func Logger

func Logger() gin.HandlerFunc

Logger 是一个自定义的日志中间件

Types

type GinConf

type GinConf struct {
	Addr string
}

type GinEvent

type GinEvent struct {
	// contains filtered or unexported fields
}

func (*GinEvent) GetEventType

func (ge *GinEvent) GetEventType() event.EventType

type GinModule

type GinModule struct {
	service.Module

	*GinConf
	*gin.Engine
	// contains filtered or unexported fields
}

func (*GinModule) AppendDataProcessor

func (gm *GinModule) AppendDataProcessor(processor ...processor.IGinProcessor)

func (*GinModule) Init

func (gm *GinModule) Init(conf *GinConf, engine *gin.Engine)

func (*GinModule) OnInit

func (gm *GinModule) OnInit() error

func (*GinModule) SafeDELETE

func (gm *GinModule) SafeDELETE(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes

func (*GinModule) SafeGET

func (gm *GinModule) SafeGET(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes

func (*GinModule) SafePATCH

func (gm *GinModule) SafePATCH(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes

func (*GinModule) SafePOST

func (gm *GinModule) SafePOST(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes

func (*GinModule) SafePut

func (gm *GinModule) SafePut(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes

func (*GinModule) SetupDataProcessor

func (gm *GinModule) SetupDataProcessor(processor ...processor.IGinProcessor)

func (*GinModule) Start

func (gm *GinModule) Start()

func (*GinModule) StartTLS

func (gm *GinModule) StartTLS(certFile, keyFile string)

func (*GinModule) Stop

func (gm *GinModule) Stop(ctx context.Context)

Jump to

Keyboard shortcuts

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