Documentation
¶
Overview ¶
Package awsquery implements the AWS Query protocol: form-encoded requests carrying an Action parameter, XML responses in a per-action envelope. STS and SNS speak it exclusively; SQS speaks it for legacy (pre-2023 SDK) clients.
The response envelope is uniform across Query services:
<{Action}Response xmlns="...">
<{Action}Result> ... </{Action}Result> (omitted for result-less actions)
<ResponseMetadata><RequestId>..</RequestId></ResponseMetadata>
</{Action}Response>
and so is the error envelope:
<ErrorResponse xmlns="..."> <Error><Type>Sender</Type><Code>..</Code><Message>..</Message></Error> <RequestId>..</RequestId> </ErrorResponse>
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
type API struct {
XMLNS string
}
API renders responses for one Query service (its xmlns is per-service).
func (API) WriteError ¶
func (a API) WriteError(w http.ResponseWriter, e *awshttp.APIError)
WriteError writes the standard Query error envelope with e's HTTP status.
func (API) WriteResult ¶
func (a API) WriteResult(w http.ResponseWriter, action string, result any)
WriteResult writes the standard success envelope. result must be a struct whose fields marshal into the {Action}Result element's children; pass nil for actions that have no result element.
Click to show internal directories.
Click to hide internal directories.