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.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package awsquery provides parsers and encoders for the AWS query-protocol wire format used by EC2, Auto-Scaling, STS, and several other services.
|
Package awsquery provides parsers and encoders for the AWS query-protocol wire format used by EC2, Auto-Scaling, STS, and several other services. |
|
Package azurearm provides shared HTTP wire-format helpers for Azure Resource Manager (ARM) JSON REST handlers.
|
Package azurearm provides shared HTTP wire-format helpers for Azure Resource Manager (ARM) JSON REST handlers. |
|
Package gcprest provides shared HTTP wire-format helpers for GCP Compute (and other GCP REST APIs) JSON handlers.
|
Package gcprest provides shared HTTP wire-format helpers for GCP Compute (and other GCP REST APIs) JSON handlers. |
Click to show internal directories.
Click to hide internal directories.