Documentation
¶
Overview ¶
Package wire provides shared HTTP wire-format helpers for service handlers: XML and JSON encoding, JSON decoding, and HTTP-date formatting.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeJSON ¶
DecodeJSON reads a JSON request body into v. Returns false and writes an error response if decoding fails.
func ToHTTPDate ¶
ToHTTPDate converts an ISO8601 timestamp to HTTP-date format (RFC1123). The AWS SDK expects Last-Modified as "Mon, 02 Jan 2006 15:04:05 GMT".
func WriteJSON ¶
func WriteJSON(w http.ResponseWriter, v any)
WriteJSON writes a JSON response with a 200 status code.
func WriteJSONError ¶
func WriteJSONError(w http.ResponseWriter, status int, errType, msg string)
WriteJSONError writes a JSON error response with the given status.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.