Documentation ¶
Index ¶
- func LimiterMiddleware(limit int) gin.HandlerFunc
- func SetDefaultErrorCode(code int) error
- func SetLog(l logger.Logger)
- func TimeoutMiddleware(millSecond int) gin.HandlerFunc
- type AsciiJSON
- type Data
- type GinError
- type GinHandler
- type GinOption
- func WithContextWithFallback(fallback bool) GinOption
- func WithForwardedByClientIP(forwarded bool) GinOption
- func WithHandleMethoNotAllowed(allowed bool) GinOption
- func WithMaxMultipartMemory(memory int64) GinOption
- func WithRedirectFixedPath(redirect bool) GinOption
- func WithRedirectTrailingSlash(redirect bool) GinOption
- func WithRemoteIPHeaders(headers []string) GinOption
- func WithRemoveExtraSlash(remove bool) GinOption
- func WithTrustedPlatform(trusted string) GinOption
- func WithUnescapePathValues(unescape bool) GinOption
- func WithUseH2C(h2c bool) GinOption
- func WithUseRawPath(rawPath bool) GinOption
- type GinRouters
- type HTML
- type HTMLDebug
- type HTMLProduction
- type IndentedJSON
- type JSON
- type JsonpJSON
- type Reader
- type Redirect
- type Render
- type Response
- type SecureJSON
- type String
- type XML
- type YAML
- type ZeroGinRouter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LimiterMiddleware ¶
func LimiterMiddleware(limit int) gin.HandlerFunc
func SetDefaultErrorCode ¶
func TimeoutMiddleware ¶
func TimeoutMiddleware(millSecond int) gin.HandlerFunc
Types ¶
type GinError ¶
func NewGinError ¶
type GinHandler ¶
GinHandler gin.HandleFunc with Render interface
type GinOption ¶
GinOption set properties of gin.Engine instance
func WithContextWithFallback ¶
WithContextWithFallback set ContextWithFallback
func WithForwardedByClientIP ¶
WithForwardedByClientIP set ForwardedByClientIP
func WithHandleMethoNotAllowed ¶
WithHandleMethoNotAllowed set HandleMethodNotAllowed
func WithMaxMultipartMemory ¶
WithMaxMultipartMemory set MaxMultipartMemory
func WithRedirectFixedPath ¶
WithRedirectFixedPath set RedirectFixedPath
func WithRedirectTrailingSlash ¶
WithRedirectTrailingSlash set RedirectTrailingSlash
func WithRemoteIPHeaders ¶
WithRemoteIPHeaders set RemoteIPHeaders
func WithRemoveExtraSlash ¶
WithRemoveExtraSlash set RemoveExtraSlash
func WithTrustedPlatform ¶
WithTrustedPlatform set TrustedPlatform
func WithUnescapePathValues ¶
WithUnescapePathValues set UnescapePathValues
type GinRouters ¶
type GinRouters interface { // Use resgister middleware Use(handler ...gin.HandlerFunc) GinRouters // Handle use GinHandler to register route Handle(method, path string, handler GinHandler) GinRouters }
GinRouters register route
type HTMLProduction ¶
type HTMLProduction = render.HTMLProduction
type IndentedJSON ¶
type IndentedJSON = render.IndentedJSON
type Render ¶
func ResponseData ¶
type SecureJSON ¶
type SecureJSON = render.SecureJSON
type ZeroGinRouter ¶
type ZeroGinRouter interface { GinRouters // Group create and return new router group Group(path string) ZeroGinRouter // Handler return http.Handler Handler() http.Handler }
ZeroGinRouter route manage
func NewZeroGinRouter ¶
func NewZeroGinRouter(opts ...GinOption) ZeroGinRouter
Source Files ¶
Click to show internal directories.
Click to hide internal directories.