package
0.0.0-20180517233053-4d662cc2f16f
Repository: https://github.com/upgear/go-kit.git
Documentation: pkg.go.dev
# Functions
ClientIP attempts to grab an IP address from the `X-Forwarded-For` header or the remote address.
Contentware sets the response `Content-Type` header.
DefaultClient is a function rather than a var (as in the http pkg) because it includes a circuit breaker so it should not be used as a client for multiple services.
Error writes a standardized error struct.
Logware logs requests.
RequestDecoder wraps a http.Request.Body with either a JSON or XML encoder based on the request `Content-Type` header.
Respond encodes an JSON or XML response after writing a status code.
ResponseDecoder wraps a http.Response.Body with the either a JSON or XML encoder based on the response `Content-Type` header.
ResponseEncoder wraps a http.ResponseWriter with the either a JSON or XML encoder based on the previously set response `Content-Type` header.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GlobalContentTypePolicy is a global variable that should not be changed while handlers are active.
# Type aliases
No description provided by the author
No description provided by the author