Documentation ¶
Index ¶
Constants ¶
const Compressed = "Compressed"
const Compressible = "Compressible"
const ContentEncoding = "ContentEncoding"
const Webp = "Webp"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcceptEncodingParser ¶
type AcceptEncodingParser struct{}
func (AcceptEncodingParser) Parse ¶
func (AcceptEncodingParser) Parse(req *http.Request, params imageserver.Params) error
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.