package protocol
Import Path
github.com/aws/aws-sdk-go/private/protocol (on go.dev)
Dependency Relation
imports 17 packages, and imported by 4 packages
Involved Source Files
host.go
host_prefix.go
idempotency.go
jsonvalue.go
payload.go
protocol.go
timestamp.go
unmarshal.go
unmarshal_error.go
Package-Level Type Names (total 10, all are exported)
ErrorUnmarshaler is an abstract interface for concrete implementations to
unmarshal protocol specific response errors.
( T) UnmarshalError(*http.Response, ResponseMetadata) (error, error)
func NewUnmarshalErrorHandler(unmarshaler ErrorUnmarshaler) *UnmarshalErrorHandler
EscapeMode is the mode that should be use for escaping a value
func DecodeJSONValue(v string, escape EscapeMode) (aws.JSONValue, error)
func EncodeJSONValue(v aws.JSONValue, escape EscapeMode) (string, error)
const Base64Escape
const NoEscape
const QuotedEscape
HandlerPayloadMarshal implements the PayloadMarshaler from a HandlerList.
This provides support for marshaling a SDK shape into an io.Writer without
needing a SDK request first.
Marshalers request.HandlerList
MarshalPayload marshals the SDK shape into the io.Writer using the
Marshalers HandlerList provided. Returns an error if unable if marshal
fails.
T : PayloadMarshaler
HandlerPayloadUnmarshal implements the PayloadUnmarshaler from a
HandlerList. This provides the support for unmarshaling a payload reader to
a shape without needing a SDK request first.
Unmarshalers request.HandlerList
UnmarshalPayload unmarshals the io.Reader payload into the SDK shape using
the Unmarshalers HandlerList provided. Returns an error if unable
unmarshaling fails.
T : PayloadUnmarshaler
HostPrefixBuilder provides the request handler to expand and prepend
the host prefix into the operation's request endpoint host.
LabelsFn func() map[string]string
Prefix string
Build updates the passed in Request with the HostPrefix template expanded.
PayloadMarshaler provides the interface for marshaling a SDK shape into and
io.Writer.
( T) MarshalPayload(io.Writer, interface{}) error
HandlerPayloadMarshal
PayloadUnmarshaler provides the interface for unmarshaling a payload's
reader into a SDK shape.
( T) UnmarshalPayload(io.Reader, interface{}) error
HandlerPayloadUnmarshal
RequireHTTPMinProtocol request handler is used to enforce that
the target endpoint supports the given major and minor HTTP protocol version.
Major int
Minor int
Handler will mark the request.Request with an error if the
target endpoint did not connect with the required HTTP protocol
major and minor version.
ResponseMetadata provides the SDK response metadata attributes.
RequestID string
StatusCode int
func ErrorUnmarshaler.UnmarshalError(*http.Response, ResponseMetadata) (error, error)
UnmarshalErrorHandler provides unmarshaling errors API response errors for
both typed and untyped errors.
unmarshaler ErrorUnmarshaler
NamedHandler returns a NamedHandler for the unmarshaler using the set of
errors the unmarshaler was initialized for.
UnmarshalError will attempt to unmarshal the API response's error message
into either a generic SDK error type, or a typed error corresponding to the
errors exception name.
func NewUnmarshalErrorHandler(unmarshaler ErrorUnmarshaler) *UnmarshalErrorHandler
Package-Level Functions (total 15, in which 14 are exported)
CanSetIdempotencyToken returns true if the struct field should be
automatically populated with a Idempotency token.
Only *string and string type fields that are tagged with idempotencyToken
which are not already set can be auto filled.
DecodeJSONValue will attempt to decode the string input as a JSONValue.
Optionally decoding base64 the value first before JSON unmarshaling.
Will panic if the escape mode is unknown.
EncodeJSONValue marshals the value into a JSON string, and optionally base64
encodes the string before returning it.
Will panic if the escape mode is unknown.
FormatTime returns a string value of the time.
GetIdempotencyToken returns a randomly generated idempotency token.
IsKnownTimestampFormat returns if the timestamp format name
is know to the SDK's protocols.
NewHostPrefixHandler constructs a build handler
NewUnmarshalErrorHandler returns an UnmarshalErrorHandler
initialized for the set of exception names to the error unmarshalers
ParseTime attempts to parse the time given the format. Returns
the time if it was able to be parsed, and fails otherwise.
SetIdempotencyToken will set the value provided with a Idempotency Token.
Given that the value can be set. Will panic if value is not setable.
UnmarshalDiscardBody is a request handler to empty a response's body and closing it.
UUIDVersion4 returns a Version 4 random UUID from the byte slice provided
ValidateEndpointHost validates that the host string passed in is a valid RFC
3986 host. Returns error if the host is not valid.
ValidHostLabel returns if the label is a valid RFC 3986 host label.
Package-Level Variables (total 3, all are exported)
RandReader is the random reader the protocol package will use to read
random bytes from. This is exported for testing, and should not be used.
UnmarshalDiscardBodyHandler is a named request handler to empty and close a response's body
ValidateEndpointHostHandler is a request handler that will validate the
request endpoint's hosts is a valid RFC 3986 host.
Package-Level Constants (total 14, in which 13 are exported)
The modes for escaping a value before it is marshaled, and unmarshaled.
ErrCodeMinimumHTTPProtocolError error code is returned when the target endpoint
did not match the required HTTP major and minor protocol version.
HostPrefixHandlerName is the handler name for the host prefix request
handler.
This format is used for output time with fractional second precision up to milliseconds
RFC3339 a subset of the ISO8601 timestamp format. e.g 2014-04-29T18:30:38Z
Names of time formats supported by the SDK
The modes for escaping a value before it is marshaled, and unmarshaled.
The modes for escaping a value before it is marshaled, and unmarshaled.
This format is used for output time without seconds precision
RFC 7231#section-7.1.1.1 timetamp format. e.g Tue, 29 Apr 2014 18:30:38 GMT
Names of time formats supported by the SDK
Names of time formats supported by the SDK
UnmarshalErrorHandlerName is the name of the named handler.
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |