Documentation ¶
Index ¶
- Variables
- func GetContentType(h http.Header) string
- func PrintRoutes(e *Engine)
- func TestHandle(handler http.Handler, method, path string, headers map[string]string) *httptest.ResponseRecorder
- func TestHandleWithBody(handler http.Handler, method, path string, body io.Reader, ...) *httptest.ResponseRecorder
- type CORSConfig
- type Context
- type Engine
- type HandlerFunc
- func Auth(skipPaths ...string) HandlerFunc
- func CORS() HandlerFunc
- func CORSWithConfig(config CORSConfig) HandlerFunc
- func GZIP(options ...gzip.Option) HandlerFunc
- func GZIPWithLevel(level int, options ...gzip.Option) HandlerFunc
- func Init() HandlerFunc
- func Logger(skipPaths ...string) HandlerFunc
- func Recovery() HandlerFunc
- type RouterGroup
Constants ¶
This section is empty.
Variables ¶
View Source
var ( WithExcludedExtensions = gzip.WithExcludedExtensions WithExcludedPaths = gzip.WithExcludedPaths WithExcludedPathsRegexs = gzip.WithExcludedPathsRegexs WithDecompressFn = gzip.WithDecompressFn )
View Source
var MaxLoggerBodySize = 1024 * 1024
Functions ¶
func GetContentType ¶
func PrintRoutes ¶
func PrintRoutes(e *Engine)
func TestHandle ¶ added in v0.0.12
Types ¶
type CORSConfig ¶
type HandlerFunc ¶
type HandlerFunc = gin.HandlerFunc
func Auth ¶
func Auth(skipPaths ...string) HandlerFunc
func CORS ¶
func CORS() HandlerFunc
func CORSWithConfig ¶
func CORSWithConfig(config CORSConfig) HandlerFunc
func GZIP ¶
func GZIP(options ...gzip.Option) HandlerFunc
func GZIPWithLevel ¶
func GZIPWithLevel(level int, options ...gzip.Option) HandlerFunc
func Init ¶
func Init() HandlerFunc
func Logger ¶
func Logger(skipPaths ...string) HandlerFunc
func Recovery ¶
func Recovery() HandlerFunc
type RouterGroup ¶
type RouterGroup = gin.RouterGroup
Source Files ¶
Click to show internal directories.
Click to hide internal directories.