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

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