Documentation ¶
Index ¶
- func GetIPWithProxyHeaders(c *gin.Context) string
- func GetIPWithValidatedProxyHeaders(c *gin.Context) string
- func Logger() gin.HandlerFunc
- type GinEvent
- type GinModule
- func (gm *GinModule) AppendDataProcessor(processor ...IGinProcessor)
- func (gm *GinModule) DELETE(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes
- func (gm *GinModule) GET(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes
- func (gm *GinModule) Init(addr string, handleTimeout time.Duration, engine *gin.Engine)
- func (gm *GinModule) OnInit() error
- func (gm *GinModule) PATCH(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes
- func (gm *GinModule) POST(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes
- func (gm *GinModule) Put(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes
- func (gm *GinModule) SafeDELETE(relativePath string, handlers ...SafeHandlerFunc) gin.IRoutes
- func (gm *GinModule) SafeGET(relativePath string, handlers ...SafeHandlerFunc) gin.IRoutes
- func (gm *GinModule) SafePATCH(relativePath string, handlers ...SafeHandlerFunc) gin.IRoutes
- func (gm *GinModule) SafePOST(relativePath string, handlers ...SafeHandlerFunc) gin.IRoutes
- func (gm *GinModule) SafePut(relativePath string, handlers ...SafeHandlerFunc) gin.IRoutes
- func (gm *GinModule) SetupDataProcessor(processor ...IGinProcessor)
- func (gm *GinModule) Start()
- func (gm *GinModule) StartTLS(certFile, keyFile string)
- func (gm *GinModule) Stop(ctx context.Context)
- type IGinProcessor
- type SafeContext
- func (c *SafeContext) AsciiJSONAndDone(code int, obj any)
- func (c *SafeContext) DataAndDone(code int, contentType string, data []byte)
- func (c *SafeContext) DataFromReaderAndDone(code int, contentLength int64, contentType string, reader io.Reader, ...)
- func (c *SafeContext) Done()
- func (c *SafeContext) HTMLAndDone(code int, name string, obj any)
- func (c *SafeContext) IndentedJSONAndDone(code int, obj any)
- func (c *SafeContext) JSONAndDone(code int, obj any)
- func (c *SafeContext) JSONPAndDone(code int, obj any)
- func (c *SafeContext) ProtoBufAndDone(code int, obj any)
- func (c *SafeContext) PureJSONAndDone(code int, obj any)
- func (c *SafeContext) RedirectAndDone(code int, location string)
- func (c *SafeContext) SecureJSONAndDone(code int, obj any)
- func (c *SafeContext) StringAndDone(code int, format string, values ...any)
- func (c *SafeContext) TOMLAndDone(code int, obj any)
- func (c *SafeContext) XMLAndDone(code int, obj any)
- func (c *SafeContext) YAMLAndDone(code int, obj any)
- type SafeHandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetIPWithProxyHeaders ¶
Types ¶
type GinEvent ¶
type GinEvent struct {
// contains filtered or unexported fields
}
func (*GinEvent) GetEventType ¶
type GinModule ¶
func (*GinModule) AppendDataProcessor ¶
func (gm *GinModule) AppendDataProcessor(processor ...IGinProcessor)
func (*GinModule) SafeDELETE ¶
func (gm *GinModule) SafeDELETE(relativePath string, handlers ...SafeHandlerFunc) gin.IRoutes
SafeDELETE 回调处理是在service协程中
func (*GinModule) SafeGET ¶
func (gm *GinModule) SafeGET(relativePath string, handlers ...SafeHandlerFunc) gin.IRoutes
SafeGET 回调处理是在service协程中
func (*GinModule) SafePATCH ¶
func (gm *GinModule) SafePATCH(relativePath string, handlers ...SafeHandlerFunc) gin.IRoutes
SafePATCH 回调处理是在service协程中
func (*GinModule) SafePOST ¶
func (gm *GinModule) SafePOST(relativePath string, handlers ...SafeHandlerFunc) gin.IRoutes
SafePOST 回调处理是在service协程中
func (*GinModule) SafePut ¶
func (gm *GinModule) SafePut(relativePath string, handlers ...SafeHandlerFunc) gin.IRoutes
SafePut 回调处理是在service协程中
func (*GinModule) SetupDataProcessor ¶
func (gm *GinModule) SetupDataProcessor(processor ...IGinProcessor)
type IGinProcessor ¶
type SafeContext ¶
func (*SafeContext) AsciiJSONAndDone ¶
func (c *SafeContext) AsciiJSONAndDone(code int, obj any)
func (*SafeContext) DataAndDone ¶
func (c *SafeContext) DataAndDone(code int, contentType string, data []byte)
func (*SafeContext) DataFromReaderAndDone ¶
func (*SafeContext) Done ¶
func (c *SafeContext) Done()
func (*SafeContext) HTMLAndDone ¶
func (c *SafeContext) HTMLAndDone(code int, name string, obj any)
func (*SafeContext) IndentedJSONAndDone ¶
func (c *SafeContext) IndentedJSONAndDone(code int, obj any)
func (*SafeContext) JSONAndDone ¶
func (c *SafeContext) JSONAndDone(code int, obj any)
func (*SafeContext) JSONPAndDone ¶
func (c *SafeContext) JSONPAndDone(code int, obj any)
func (*SafeContext) ProtoBufAndDone ¶
func (c *SafeContext) ProtoBufAndDone(code int, obj any)
func (*SafeContext) PureJSONAndDone ¶
func (c *SafeContext) PureJSONAndDone(code int, obj any)
func (*SafeContext) RedirectAndDone ¶
func (c *SafeContext) RedirectAndDone(code int, location string)
func (*SafeContext) SecureJSONAndDone ¶
func (c *SafeContext) SecureJSONAndDone(code int, obj any)
func (*SafeContext) StringAndDone ¶
func (c *SafeContext) StringAndDone(code int, format string, values ...any)
func (*SafeContext) TOMLAndDone ¶
func (c *SafeContext) TOMLAndDone(code int, obj any)
func (*SafeContext) XMLAndDone ¶
func (c *SafeContext) XMLAndDone(code int, obj any)
func (*SafeContext) YAMLAndDone ¶
func (c *SafeContext) YAMLAndDone(code int, obj any)
type SafeHandlerFunc ¶
type SafeHandlerFunc func(*SafeContext)
Click to show internal directories.
Click to hide internal directories.