package
3.1.5+incompatible
Repository: https://github.com/go-playground/pkg.git
Documentation: pkg.go.dev
# Functions
AcceptedLanguages returns an array of accepted languages denoted by the Accept-Language header sent by the browser.
Attachment is a helper method for returning an attachement file to be downloaded, if you with to open inline see function Inline.
ClientIP implements a best effort algorithm to return the real client IP, it parses X-Real-IP and X-Forwarded-For in order to work properly with reverse-proxies such us: nginx or haproxy.
Decode takes the request and attempts to discover it's content type via the http headers and then decode the request body into the provided struct.
DecodeForm parses the requests form data into the provided struct.
DecodeJSON decodes the request body into the provided struct and limits the request size via an ioext.LimitReader using the maxMemory param.
DecodeMultipartForm parses the requests form data into the provided struct.
DecodeQueryParams takes the URL Query params flag.
DecodeXML decodes the request body into the provided struct and limits the request size via an ioext.LimitReader using the maxMemory param.
Inline is a helper method for returning a file inline to be rendered/opened by the browser.
JSON marshals provided interface + returns JSON + status code.
JSONBytes returns provided JSON response with status code.
JSONP sends a JSONP response with status code and uses `callback` to construct the JSONP payload.
QualityValue accepts a value to add/concatenate a quality value to and the quality value itself.
XML marshals provided interface + returns XML + status code.
XMLBytes returns provided XML response with status code.
# Constants
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
Accept-Encoding values.
Mime Type values for the Content-Type HTTP header.
Mime Type values for the Content-Type HTTP header.
Mime Type values for the Content-Type HTTP header.
Mime Type values for the Content-Type HTTP header.
Mime Type values for the Content-Type HTTP header.
Mime Type values for the Content-Type HTTP header.
Mime Type values for the Content-Type HTTP header.
Mime Type values for the Content-Type HTTP header.
HTTP Header keys.
Accept-Encoding values.
HTTP Header keys.
Accept-Encoding values.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
Accept-Encoding values.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
Accept-Encoding values.
HTTP Header keys.
Accept-Encoding values.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
Mime Type values for the Content-Type HTTP header.
Mime Type values for the Content-Type HTTP header.
Mime Type values for the Content-Type HTTP header.
Mime Type values for the Content-Type HTTP header.
Charset values.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
Mime Type values for the Content-Type HTTP header.
No description provided by the author
Mime Type values for the Content-Type HTTP header.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
QualityValueFormat is a format string helper for Quality Values.
No description provided by the author
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
Mime Type values for the Content-Type HTTP header.
Mime Type values for the Content-Type HTTP header.
Mime Type values for the Content-Type HTTP header.
Mime Type values for the Content-Type HTTP header.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
Charset values.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
HTTP Header keys.
# Variables
DefaultFormDecoder of this package, which is configurable.
# Interfaces
FormDecoder is the type used for decoding a form for use.
# Type aliases
QueryParamsOption represents the options for including query parameters during Decode helper functions.