compress

package
v0.0.0-...-37a4a7e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Compressed = "Compressed"
View Source
const Compressible = "Compressible"
View Source
const ContentEncoding = "ContentEncoding"
View Source
const Webp = "Webp"

Variables

This section is empty.

Functions

This section is empty.

Types

type AcceptEncodingParser

type AcceptEncodingParser struct{}

func (AcceptEncodingParser) Parse

Parse parses a *net/http.Request and fill Params.

func (AcceptEncodingParser) Resolve

func (AcceptEncodingParser) Resolve(param string) (httpParam string)

Resolve resolves an internal param to a HTTP param. It returns the resolved HTTP param, or an empty string if it can not be resolved. It is used by Handler to generate errors messages.

type CompressibleParser

type CompressibleParser struct{}

func (CompressibleParser) IsCompressible

func (CompressibleParser) IsCompressible(req *http.Request, contentType string) bool

check

func (CompressibleParser) Parse

func (c CompressibleParser) Parse(req *http.Request, params imageserver.Params) error

Parse parses a *net/http.Request and fill Params.

func (CompressibleParser) Resolve

func (CompressibleParser) Resolve(param string) (httpParam string)

Resolve resolves an internal param to a HTTP param. It returns the resolved HTTP param, or an empty string if it can not be resolved. It is used by Handler to generate errors messages.

type WebpParser

type WebpParser struct{}

func (WebpParser) Parse

func (WebpParser) Parse(req *http.Request, params imageserver.Params) error

Parse parses a *net/http.Request and fill Params.

func (WebpParser) Resolve

func (WebpParser) Resolve(param string) (httpParam string)

Resolve resolves an internal param to a HTTP param. It returns the resolved HTTP param, or an empty string if it can not be resolved. It is used by Handler to generate errors messages.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL