Documentation
¶
Index ¶
Constants ¶
View Source
const ( // NoCompression copied from gzip.NoCompression NoCompression = "noCompression" // BestSpeed copied from gzip.BestSpeed BestSpeed = "bestSpeed" // BestCompression copied from gzip.BestCompression BestCompression = "bestCompression" // DefaultCompression copied from gzip.DefaultCompression DefaultCompression = "defaultCompression" // HuffmanOnly copied from gzip.HuffmanOnly HuffmanOnly = "huffmanOnly" )
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶
func Middleware(opts ...Option) gin.HandlerFunc
Middleware Add gzip compress and decompress interceptors.
Mainly copied from bellow. https://github.com/labstack/echo/blob/master/middleware/decompress.go https://github.com/labstack/echo/blob/master/middleware/compress.go
Types ¶
type Option ¶
type Option func(*optionSet)
Option if for middleware options while creating middleware
func WithEntryNameAndType ¶
WithEntryNameAndType provide entry name and entry type.
func WithPathToIgnore ¶
WithPathToIgnore provide path prefix to ignore middleware
Click to show internal directories.
Click to hide internal directories.