Documentation
¶
Index ¶
Constants ¶
View Source
const ( EncodingBrotli = "br" EncodingDeflate = "deflate" EncodingGzip = "gzip" EncodingZstd = "zstd" )
Variables ¶
This section is empty.
Functions ¶
func Default ¶
func Default() lightning.Middleware
Default returns a lightning middleware with default options
func New ¶
func New(options ...Options) lightning.Middleware
New returns a lightning middleware with the given options
Types ¶
type BrotliCompression ¶
type BrotliCompression struct{}
type Compressor ¶
Compressor is an interface that defines the Compress method
type DeflateCompression ¶
type DeflateCompression struct{}
type GzipCompression ¶
type GzipCompression struct{}
type Options ¶
type Options func(*config)
Options is a function that takes a pointer to a config struct
func WithBrotliCompressionLevel ¶
WithBrotliCompressionLevel sets the compression level for Brotli compression algorithm
func WithDeflateCompressionLevel ¶
WithDeflateCompressionLevel sets the compression level for Deflate compression algorithm
func WithGzipCompressionLevel ¶
WithGzipCompressionLevel sets the compression level for Gzip compression algorithm
type ZstdCompression ¶
type ZstdCompression struct{}
Click to show internal directories.
Click to hide internal directories.