package s3shared
import "github.com/aws/aws-sdk-go-v2/service/internal/s3shared"
Index ¶
- func AddMetadataRetrieverMiddleware(stack *middleware.Stack)
- func AddResponseErrorMiddleware(stack *middleware.Stack)
- func GetHostIDMetadata(metadata middleware.Metadata) (string, bool)
- func SetHostIDMetadata(metadata *middleware.Metadata, id string)
- type ErrorComponents
- type ResponseError
Functions ¶
func AddMetadataRetrieverMiddleware ¶
func AddMetadataRetrieverMiddleware(stack *middleware.Stack)
AddMetadataRetrieverMiddleware adds request id, host id retriever middleware
func AddResponseErrorMiddleware ¶
func AddResponseErrorMiddleware(stack *middleware.Stack)
AddResponseErrorMiddleware adds response error wrapper middleware
func GetHostIDMetadata ¶
func GetHostIDMetadata(metadata middleware.Metadata) (string, bool)
GetHostIDMetadata retrieves the host id from middleware metadata returns host id as string along with a boolean indicating presence of hostId on middleware metadata.
func SetHostIDMetadata ¶
func SetHostIDMetadata(metadata *middleware.Metadata, id string)
SetHostIDMetadata sets the provided host id over middleware metadata
Types ¶
type ErrorComponents ¶
type ErrorComponents struct { Code string `xml:"Code"` Message string `xml:"Message"` RequestID string `xml:"RequestId"` HostID string `xml:"HostId"` }
ErrorComponents represents the error response fields that will be deserialized from an xml error response body
func GetErrorResponseComponents ¶
func GetErrorResponseComponents(r io.Reader) (ErrorComponents, error)
GetErrorResponseComponents returns the error fields from an xml error response body
type ResponseError ¶
type ResponseError struct { *awshttp.ResponseError // HostID associated with response error HostID string }
ResponseError provides the HTTP centric error type wrapping the underlying error with the HTTP response value and the deserialized RequestID.
func (*ResponseError) As ¶
func (e *ResponseError) As(target interface{}) bool
As populates target and returns true if the type of target is a error type that the ResponseError embeds, (e.g.S3 HTTP ResponseError)
func (*ResponseError) Error ¶
func (e *ResponseError) Error() string
Error returns the formatted error
func (*ResponseError) ServiceHostID ¶
func (e *ResponseError) ServiceHostID() string
ServiceHostID returns the host id associated with Response Error
Source Files ¶
host_id.go metadata_retriever.go response_error.go response_error_middleware.go xml_utils.go
- Version
- v0.1.0
- Published
- Sep 29, 2020
- Platform
- js/wasm
- Imports
- 10 packages
- Last checked
- now –
Tools for package owners.