Package: s3shared
Type Summary collapse
-
ARNLookup
struct
ARNLookup is the initial middleware that looks up if an arn is provided.
-
ConfigurationError
struct
ConfigurationError is used to denote a client configuration error.
-
EnableDualstack
struct
EnableDualstack represents middleware struct for enabling dualstack support.
-
ErrorComponents
struct
ErrorComponents represents the error response fields that will be deserialized from an xml error response body.
-
ErrorResponseDeserializerOptions
struct
ErrorResponseDeserializerOptions represents error response deserializer options for s3 and s3-control service.
-
InvalidARNError
struct
InvalidARNError denotes the error for Invalid ARN.
-
ResourceRequest
struct
ResourceRequest represents an ARN resource and api request metadata.
-
ResponseError
struct
ResponseError provides the HTTP centric error type wrapping the underlying error with the HTTP response value and the deserialized RequestID.
Function Summary collapse
-
func Add100Continue(stack *middleware.Stack, continueHeaderThresholdBytes int64) error
Add100Continue add middleware, which adds 100-continue header for s3 client HTTP PUT request larger than 2MB or with unknown size streaming bodies, during operation builder step.
-
func AddMetadataRetrieverMiddleware(stack *middleware.Stack) error
AddMetadataRetrieverMiddleware adds request id, host id retriever middleware.
-
func AddResponseErrorMiddleware(stack *middleware.Stack) error
AddResponseErrorMiddleware adds response error wrapper middleware.
-
func GetARNResourceFromContext(ctx context.Context) (arn.ARN, bool)
GetARNResourceFromContext returns an ARN from context and a bool indicating presence of ARN on ctx.
-
func GetErrorResponseComponents(r io.Reader, options ErrorResponseDeserializerOptions) (ErrorComponents, error)
GetErrorResponseComponents retrieves error components according to passed in options.
-
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 GetUnwrappedErrorResponseComponents(r io.Reader) (ErrorComponents, error)
GetUnwrappedErrorResponseComponents returns the error fields from an xml error response body.
-
func GetWrappedErrorResponseComponents(r io.Reader) (ErrorComponents, error)
GetWrappedErrorResponseComponents returns the error fields from an xml error response body in which error code, and message are wrapped by a <Error> tag.
-
func IsClonedInput(ctx context.Context) bool
IsClonedInput retrieves if context key for cloned input was set.
-
func IsFIPS(region string) bool
IsFIPS returns true if region is a fips pseudo-region.
-
func NewClientConfiguredForAccelerateError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError
NewClientConfiguredForAccelerateError denotes client config error for unsupported S3 accelerate.
-
func NewClientConfiguredForCrossRegionFIPSError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError
NewClientConfiguredForCrossRegionFIPSError denotes client config error for unsupported cross region FIPS request.
-
func NewClientConfiguredForDualStackError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError
NewClientConfiguredForDualStackError denotes client config error for unsupported S3 Dual-stack.
-
func NewClientConfiguredForFIPSError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError
NewClientConfiguredForFIPSError denotes client config error for unsupported cross region FIPS access.
-
func NewClientPartitionMismatchError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError
NewClientPartitionMismatchError stub.
-
func NewClientRegionMismatchError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError
NewClientRegionMismatchError denotes cross region access error.
-
func NewFailedToResolveEndpointError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError
NewFailedToResolveEndpointError denotes endpoint resolving error.
-
func NewFIPSConfigurationError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError
NewFIPSConfigurationError denotes a configuration error when a client or request is configured for FIPS.
-
func NewInvalidARNError(resource arn.Resource, err error) InvalidARNError
NewInvalidARNError denotes invalid arn error.
-
func NewInvalidARNWithFIPSError(resource arn.Resource, err error) InvalidARNError
NewInvalidARNWithFIPSError ARN not supported for FIPS region.
-
func NewInvalidARNWithUnsupportedPartitionError(resource arn.Resource, err error) InvalidARNError
NewInvalidARNWithUnsupportedPartitionError ARN not supported for the target partition.
-
func SetClonedInputKey(ctx context.Context, value bool) context.Context
SetClonedInputKey sets a key on context to denote input was cloned previously.
-
func SetHostIDMetadata(metadata *middleware.Metadata, id string)
SetHostIDMetadata sets the provided host id over middleware metadata.
Type Details
EnableDualstack struct
EnableDualstack represents middleware struct for enabling dualstack support
Deprecated: See EndpointResolverOptions’ UseDualStackEndpoint support
ErrorComponents struct
ErrorComponents represents the error response fields that will be deserialized from an xml error response body
ErrorResponseDeserializerOptions struct
ErrorResponseDeserializerOptions represents error response deserializer options for s3 and s3-control service
Function Details
func Add100Continue(stack *middleware.Stack, continueHeaderThresholdBytes int64) error
Add100Continue add middleware, which adds 100-continue header for s3 client HTTP PUT request larger than 2MB or with unknown size streaming bodies, during operation builder step
14 15 16 17 18 |
// File 'service/internal/s3shared/s3100continue.go', line 14
|
func AddMetadataRetrieverMiddleware(stack *middleware.Stack) error
AddMetadataRetrieverMiddleware adds request id, host id retriever middleware
14 15 16 17 18 |
// File 'service/internal/s3shared/metadata_retriever.go', line 14
|
func AddResponseErrorMiddleware(stack *middleware.Stack) error
AddResponseErrorMiddleware adds response error wrapper middleware
12 13 14 15 16 |
// File 'service/internal/s3shared/response_error_middleware.go', line 12
|
func GetARNResourceFromContext(ctx context.Context) (arn.ARN, bool)
GetARNResourceFromContext returns an ARN from context and a bool indicating presence of ARN on ctx.
Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues to clear all stack values.
69 70 71 72 |
// File 'service/internal/s3shared/arn_lookup.go', line 69
|
func GetErrorResponseComponents(r io.Reader, options ErrorResponseDeserializerOptions) (ErrorComponents, error)
GetErrorResponseComponents retrieves error components according to passed in options
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
// File 'service/internal/s3shared/xml_utils.go', line 51
|
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.
18 19 20 21 22 23 24 25 26 27 28 |
// File 'service/internal/s3shared/host_id.go', line 18
|
func GetUnwrappedErrorResponseComponents(r io.Reader) (ErrorComponents, error)
GetUnwrappedErrorResponseComponents returns the error fields from an xml error response body
20 21 22 23 24 25 26 |
// File 'service/internal/s3shared/xml_utils.go', line 20
|
func GetWrappedErrorResponseComponents(r io.Reader) (ErrorComponents, error)
GetWrappedErrorResponseComponents returns the error fields from an xml error response body in which error code, and message are wrapped by a <Error> tag
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
// File 'service/internal/s3shared/xml_utils.go', line 30
|
func IsClonedInput(ctx context.Context) bool
IsClonedInput retrieves if context key for cloned input was set. If set, we can infer that the reuqest input was cloned previously.
Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues to clear all stack values.
24 25 26 27 |
// File 'service/internal/s3shared/metadata.go', line 24
|
func IsFIPS(region string) bool
IsFIPS returns true if region is a fips pseudo-region
Deprecated: FIPS should be specified via EndpointOptions.
73 74 75 76 |
// File 'service/internal/s3shared/resource_request.go', line 73
|
func NewClientConfiguredForAccelerateError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError
NewClientConfiguredForAccelerateError denotes client config error for unsupported S3 accelerate
152 153 154 155 156 157 158 159 160 |
// File 'service/internal/s3shared/endpoint_error.go', line 152
|
func NewClientConfiguredForCrossRegionFIPSError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError
NewClientConfiguredForCrossRegionFIPSError denotes client config error for unsupported cross region FIPS request
163 164 165 166 167 168 169 170 171 |
// File 'service/internal/s3shared/endpoint_error.go', line 163
|
func NewClientConfiguredForDualStackError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError
NewClientConfiguredForDualStackError denotes client config error for unsupported S3 Dual-stack
174 175 176 177 178 179 180 181 182 |
// File 'service/internal/s3shared/endpoint_error.go', line 174
|
func NewClientConfiguredForFIPSError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError
NewClientConfiguredForFIPSError denotes client config error for unsupported cross region FIPS access
130 131 132 133 134 135 136 137 138 |
// File 'service/internal/s3shared/endpoint_error.go', line 130
|
func NewClientPartitionMismatchError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError
NewClientPartitionMismatchError stub
97 98 99 100 101 102 103 104 105 |
// File 'service/internal/s3shared/endpoint_error.go', line 97
|
func NewClientRegionMismatchError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError
NewClientRegionMismatchError denotes cross region access error
108 109 110 111 112 113 114 115 116 |
// File 'service/internal/s3shared/endpoint_error.go', line 108
|
func NewFailedToResolveEndpointError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError
NewFailedToResolveEndpointError denotes endpoint resolving error
119 120 121 122 123 124 125 126 127 |
// File 'service/internal/s3shared/endpoint_error.go', line 119
|
func NewFIPSConfigurationError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError
NewFIPSConfigurationError denotes a configuration error when a client or request is configured for FIPS
141 142 143 144 145 146 147 148 149 |
// File 'service/internal/s3shared/endpoint_error.go', line 141
|
func NewInvalidARNError(resource arn.Resource, err error) InvalidARNError
NewInvalidARNError denotes invalid arn error
42 43 44 45 46 47 48 |
// File 'service/internal/s3shared/endpoint_error.go', line 42
|
func NewInvalidARNWithFIPSError(resource arn.Resource, err error) InvalidARNError
NewInvalidARNWithFIPSError ARN not supported for FIPS region
Deprecated: FIPS will not appear in the ARN region component.
62 63 64 65 66 67 68 |
// File 'service/internal/s3shared/endpoint_error.go', line 62
|
func NewInvalidARNWithUnsupportedPartitionError(resource arn.Resource, err error) InvalidARNError
NewInvalidARNWithUnsupportedPartitionError ARN not supported for the target partition
51 52 53 54 55 56 57 |
// File 'service/internal/s3shared/endpoint_error.go', line 51
|
func SetClonedInputKey(ctx context.Context, value bool) context.Context
SetClonedInputKey sets a key on context to denote input was cloned previously.
Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues to clear all stack values.
15 16 17 |
// File 'service/internal/s3shared/metadata.go', line 15
|
func SetHostIDMetadata(metadata *middleware.Metadata, id string)
SetHostIDMetadata sets the provided host id over middleware metadata
11 12 13 |
// File 'service/internal/s3shared/host_id.go', line 11
|