Documentation ¶
Index ¶
Constants ¶
View Source
const ( AnyName = "*" DefaultName = "compress" GzipName = "gzip" DeflateName = "deflate" BrotliName = "br" )
Variables ¶
This section is empty.
Functions ¶
func DecodeResponse ¶ added in v1.2.21
func DecodeResponse(header transports.Header, body []byte) (p []byte, err error)
func New ¶ added in v1.2.63
func New() transports.Middleware
Types ¶
type BrotliCompressor ¶
type BrotliCompressor struct {
// contains filtered or unexported fields
}
func (*BrotliCompressor) Compress ¶
func (b *BrotliCompressor) Compress(p []byte) (out []byte, err error)
func (*BrotliCompressor) Name ¶
func (b *BrotliCompressor) Name() string
type Compressor ¶
type DeflateCompressor ¶
type DeflateCompressor struct {
// contains filtered or unexported fields
}
func (*DeflateCompressor) Compress ¶
func (d *DeflateCompressor) Compress(p []byte) (out []byte, err error)
func (*DeflateCompressor) Name ¶
func (d *DeflateCompressor) Name() string
type GzipCompressor ¶
type GzipCompressor struct {
// contains filtered or unexported fields
}
func (*GzipCompressor) Compress ¶
func (g *GzipCompressor) Compress(p []byte) (out []byte, err error)
func (*GzipCompressor) Name ¶
func (g *GzipCompressor) Name() string
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
func (*Middleware) Close ¶
func (middle *Middleware) Close() (err error)
func (*Middleware) Construct ¶
func (middle *Middleware) Construct(options transports.MiddlewareOptions) error
func (*Middleware) Handler ¶
func (middle *Middleware) Handler(next transports.Handler) transports.Handler
func (*Middleware) Name ¶
func (middle *Middleware) Name() string
Click to show internal directories.
Click to hide internal directories.