Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultBrotliConfig = BrotliConfig{ Skipper: middleware.DefaultSkipper, Level: brotli.DefaultCompression, } )
DefaultBrotliConfig is the default Brotli middleware config
Functions ¶
func Brotli ¶
func Brotli() echo.MiddlewareFunc
Brotli returns a middleware which compresses HTTP response using brotli compression
func BrotliWithConfig ¶
func BrotliWithConfig(config BrotliConfig) echo.MiddlewareFunc
BrotliWithConfig return Brotli middleware with config
func GenerateRandomBytes ¶
GenerateRandomBytes using a Cryptographically Secure Pseudorandom Number Generator (CSPRNG)
Types ¶
type BrotliConfig ¶
type BrotliConfig struct { // Skipper defines a function to skip middleware Skipper middleware.Skipper // Brotli compression level, optional default = -1 Level int `yaml:"level"` }
BrotliConfig defines the config for Brotli middleware
Click to show internal directories.
Click to hide internal directories.