Documentation ¶
Index ¶
- Constants
- func AddClientRequestIDMiddleware(stack *middleware.Stack) error
- func AddRawResponseToMetadata(stack *middleware.Stack) error
- func AddRecordResponseTiming(stack *middleware.Stack) error
- func AddRecursionDetection(stack *middleware.Stack) error
- func AddRequestIDRetrieverMiddleware(stack *middleware.Stack) error
- func AddRequestUserAgentMiddleware(stack *middleware.Stack) error
- func AddSDKAgentKey(keyType SDKAgentKeyType, key string) func(*middleware.Stack) error
- func AddSDKAgentKeyValue(keyType SDKAgentKeyType, key, value string) func(*middleware.Stack) error
- func AddUserAgentKey(key string) func(*middleware.Stack) error
- func AddUserAgentKeyValue(key, value string) func(*middleware.Stack) error
- func GetAttemptSkew(metadata middleware.Metadata) (v time.Duration, ok bool)
- func GetEndpointSource(ctx context.Context) (v aws.EndpointSource)
- func GetOperationName(ctx context.Context) (v string)
- func GetPartitionID(ctx context.Context) string
- func GetRawResponse(metadata middleware.Metadata) interface{}
- func GetRegion(ctx context.Context) (v string)
- func GetRequestIDMetadata(metadata middleware.Metadata) (string, bool)
- func GetRequiresLegacyEndpoints(ctx context.Context) bool
- func GetResponseAt(metadata middleware.Metadata) (v time.Time, ok bool)
- func GetServerTime(metadata middleware.Metadata) (v time.Time, ok bool)
- func GetServiceID(ctx context.Context) (v string)
- func GetSigningCredentials(ctx context.Context) (v aws.Credentials)
- func GetSigningName(ctx context.Context) (v string)deprecated
- func GetSigningRegion(ctx context.Context) (v string)deprecated
- func SetEndpointSource(ctx context.Context, value aws.EndpointSource) context.Context
- func SetPartitionID(ctx context.Context, value string) context.Context
- func SetRequestIDMetadata(metadata *middleware.Metadata, id string)
- func SetRequiresLegacyEndpoints(ctx context.Context, value bool) context.Context
- func SetServiceID(ctx context.Context, value string) context.Context
- func SetSigningCredentials(ctx context.Context, value aws.Credentials) context.Context
- func SetSigningName(ctx context.Context, value string) context.Contextdeprecated
- func SetSigningRegion(ctx context.Context, value string) context.Contextdeprecated
- type AddRawResponse
- type ClientRequestID
- type RecordResponseTiming
- type RecursionDetection
- type RegisterServiceMetadata
- type RequestIDRetriever
- type RequestUserAgent
- func (u *RequestUserAgent) AddSDKAgentKey(keyType SDKAgentKeyType, key string)
- func (u *RequestUserAgent) AddSDKAgentKeyValue(keyType SDKAgentKeyType, key, value string)
- func (u *RequestUserAgent) AddUserAgentFeature(feature UserAgentFeature)
- func (u *RequestUserAgent) AddUserAgentKey(key string)
- func (u *RequestUserAgent) AddUserAgentKeyValue(key, value string)
- func (u *RequestUserAgent) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (out middleware.BuildOutput, metadata middleware.Metadata, err error)
- func (u *RequestUserAgent) ID() string
- type SDKAgentKeyType
- type UserAgentFeature
Constants ¶
const ( UserAgentFeatureResourceModel UserAgentFeature = "A" // n/a (we don't generate separate resource types) UserAgentFeatureWaiter = "B" UserAgentFeaturePaginator = "C" UserAgentFeatureRetryModeLegacy = "D" // n/a (equivalent to standard) UserAgentFeatureRetryModeStandard = "E" UserAgentFeatureRetryModeAdaptive = "F" UserAgentFeatureS3Transfer = "G" UserAgentFeatureS3CryptoV1N = "H" // n/a (crypto client is external) UserAgentFeatureS3CryptoV2 = "I" // n/a UserAgentFeatureS3ExpressBucket = "J" UserAgentFeatureS3AccessGrants = "K" // not yet implemented UserAgentFeatureGZIPRequestCompression = "L" UserAgentFeatureProtocolRPCV2CBOR = "M" )
Enumerates UserAgentFeature.
Variables ¶
This section is empty.
Functions ¶
func AddClientRequestIDMiddleware ¶ added in v0.30.0
func AddClientRequestIDMiddleware(stack *middleware.Stack) error
AddClientRequestIDMiddleware adds ClientRequestID to the middleware stack
func AddRawResponseToMetadata ¶ added in v1.0.0
func AddRawResponseToMetadata(stack *middleware.Stack) error
AddRawResponseToMetadata adds middleware to the middleware stack that store raw response on to the metadata.
func AddRecordResponseTiming ¶ added in v1.0.0
func AddRecordResponseTiming(stack *middleware.Stack) error
AddRecordResponseTiming adds RecordResponseTiming middleware to the middleware stack.
func AddRecursionDetection ¶ added in v1.18.0
func AddRecursionDetection(stack *middleware.Stack) error
AddRecursionDetection adds recursionDetection to the middleware stack
func AddRequestIDRetrieverMiddleware ¶ added in v0.25.0
func AddRequestIDRetrieverMiddleware(stack *middleware.Stack) error
AddRequestIDRetrieverMiddleware adds request id retriever middleware
func AddRequestUserAgentMiddleware ¶ added in v1.0.0
func AddRequestUserAgentMiddleware(stack *middleware.Stack) error
AddRequestUserAgentMiddleware registers a requestUserAgent middleware on the stack if not present.
func AddSDKAgentKey ¶ added in v1.0.0
func AddSDKAgentKey(keyType SDKAgentKeyType, key string) func(*middleware.Stack) error
AddSDKAgentKey retrieves a requestUserAgent from the provided stack, or initializes one.
func AddSDKAgentKeyValue ¶ added in v1.0.0
func AddSDKAgentKeyValue(keyType SDKAgentKeyType, key, value string) func(*middleware.Stack) error
AddSDKAgentKeyValue retrieves a requestUserAgent from the provided stack, or initializes one.
func AddUserAgentKey ¶ added in v0.25.0
func AddUserAgentKey(key string) func(*middleware.Stack) error
AddUserAgentKey retrieves a requestUserAgent from the provided stack, or initializes one.
func AddUserAgentKeyValue ¶ added in v0.25.0
func AddUserAgentKeyValue(key, value string) func(*middleware.Stack) error
AddUserAgentKeyValue retrieves a requestUserAgent from the provided stack, or initializes one.
func GetAttemptSkew ¶ added in v1.0.0
func GetAttemptSkew(metadata middleware.Metadata) (v time.Duration, ok bool)
GetAttemptSkew returns Attempt clock skew for response from metadata.
func GetEndpointSource ¶ added in v1.2.0
func GetEndpointSource(ctx context.Context) (v aws.EndpointSource)
GetEndpointSource returns an endpoint source if set on context
func GetOperationName ¶ added in v0.25.0
GetOperationName retrieves the service operation metadata from the context.
Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues to clear all stack values.
func GetPartitionID ¶ added in v0.30.0
GetPartitionID retrieves the endpoint partition id from the context.
Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues to clear all stack values.
func GetRawResponse ¶ added in v1.0.0
func GetRawResponse(metadata middleware.Metadata) interface{}
GetRawResponse returns raw response set on metadata
func GetRegion ¶ added in v0.25.0
GetRegion retrieves the endpoint region from the context.
Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues to clear all stack values.
func GetRequestIDMetadata ¶ added in v0.25.0
func GetRequestIDMetadata(metadata middleware.Metadata) (string, bool)
GetRequestIDMetadata retrieves the request id from middleware metadata returns string and bool indicating value of request id, whether request id was set.
func GetRequiresLegacyEndpoints ¶ added in v1.20.0
GetRequiresLegacyEndpoints the flag used to indicate if legacy endpoint customizations need to be executed.
Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues to clear all stack values.
func GetResponseAt ¶ added in v1.0.0
func GetResponseAt(metadata middleware.Metadata) (v time.Time, ok bool)
GetResponseAt returns the time response was received at.
func GetServerTime ¶ added in v1.0.0
func GetServerTime(metadata middleware.Metadata) (v time.Time, ok bool)
GetServerTime returns the server time for response.
func GetServiceID ¶ added in v0.25.0
GetServiceID retrieves the service id from the context.
Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues to clear all stack values.
func GetSigningCredentials ¶ added in v1.11.0
func GetSigningCredentials(ctx context.Context) (v aws.Credentials)
GetSigningCredentials returns the credentials that were used for signing if set on context.
func GetSigningName
deprecated
added in
v0.25.0
GetSigningName retrieves the service signing name from the context.
Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues to clear all stack values.
Deprecated: This value is unstable. The resolved signing name is available in the signer properties object passed to the signer.
func GetSigningRegion
deprecated
added in
v0.25.0
GetSigningRegion retrieves the region from the context.
Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues to clear all stack values.
Deprecated: This value is unstable. The resolved signing region is available in the signer properties object passed to the signer.
func SetEndpointSource ¶ added in v1.2.0
SetEndpointSource sets endpoint source on context
func SetPartitionID ¶ added in v0.30.0
SetPartitionID sets the partition id of a resolved region on the context
Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues to clear all stack values.
func SetRequestIDMetadata ¶ added in v0.25.0
func SetRequestIDMetadata(metadata *middleware.Metadata, id string)
SetRequestIDMetadata sets the provided request id over middleware metadata
func SetRequiresLegacyEndpoints ¶ added in v1.20.0
SetRequiresLegacyEndpoints set or modifies the flag indicated that legacy endpoint customizations are needed.
Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues to clear all stack values.
func SetServiceID ¶ added in v0.30.0
SetServiceID sets the service id on the context.
Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues to clear all stack values.
func SetSigningCredentials ¶ added in v1.11.0
SetSigningCredentials sets the credentails used for signing on the context.
func SetSigningName
deprecated
added in
v0.25.0
SetSigningName set or modifies the sigv4 or sigv4a signing name on the context.
Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues to clear all stack values.
Deprecated: This value is unstable. Use WithSigV4SigningName client option funcs instead.
func SetSigningRegion
deprecated
added in
v0.25.0
SetSigningRegion sets or modifies the region on the context.
Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues to clear all stack values.
Deprecated: This value is unstable. Use WithSigV4SigningRegion client option funcs instead.
Types ¶
type AddRawResponse ¶ added in v1.25.2
type AddRawResponse struct{}
AddRawResponse middleware adds raw response on to the metadata
func (AddRawResponse) HandleDeserialize ¶ added in v1.25.2
func (m AddRawResponse) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, )
HandleDeserialize adds raw response on the middleware metadata
func (*AddRawResponse) ID ¶ added in v1.25.2
func (m *AddRawResponse) ID() string
ID the identifier for the ClientRequestID
type ClientRequestID ¶ added in v0.30.0
type ClientRequestID struct{}
ClientRequestID is a Smithy BuildMiddleware that will generate a unique ID for logical API operation invocation.
func (ClientRequestID) HandleBuild ¶ added in v0.30.0
func (r ClientRequestID) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( out middleware.BuildOutput, metadata middleware.Metadata, err error, )
HandleBuild attaches a unique operation invocation id for the operation to the request
func (*ClientRequestID) ID ¶ added in v0.30.0
func (r *ClientRequestID) ID() string
ID the identifier for the ClientRequestID
type RecordResponseTiming ¶ added in v1.0.0
type RecordResponseTiming struct{}
RecordResponseTiming records the response timing for the SDK client requests.
func (RecordResponseTiming) HandleDeserialize ¶ added in v1.0.0
func (a RecordResponseTiming) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, )
HandleDeserialize calculates response metadata and clock skew
func (*RecordResponseTiming) ID ¶ added in v1.0.0
func (a *RecordResponseTiming) ID() string
ID is the middleware identifier
type RecursionDetection ¶ added in v1.18.0
type RecursionDetection struct{}
RecursionDetection detects Lambda environment and sets its X-Ray trace ID to request header if absent to avoid recursion invocation in Lambda
func (*RecursionDetection) HandleBuild ¶ added in v1.18.0
func (m *RecursionDetection) HandleBuild( ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, ) ( out middleware.BuildOutput, metadata middleware.Metadata, err error, )
HandleBuild detects Lambda environment and adds its trace ID to request header if absent
func (*RecursionDetection) ID ¶ added in v1.18.0
func (m *RecursionDetection) ID() string
ID returns the middleware identifier
type RegisterServiceMetadata ¶ added in v0.25.0
type RegisterServiceMetadata struct { ServiceID string SigningName string Region string OperationName string }
RegisterServiceMetadata registers metadata about the service and operation into the middleware context so that it is available at runtime for other middleware to introspect.
func (RegisterServiceMetadata) HandleInitialize ¶ added in v0.25.0
func (s RegisterServiceMetadata) HandleInitialize( ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, ) (out middleware.InitializeOutput, metadata middleware.Metadata, err error)
HandleInitialize registers service metadata information into the middleware context, allowing for introspection.
func (*RegisterServiceMetadata) ID ¶ added in v0.25.0
func (s *RegisterServiceMetadata) ID() string
ID returns the middleware identifier.
type RequestIDRetriever ¶ added in v1.25.2
type RequestIDRetriever struct { }
RequestIDRetriever middleware captures the AWS service request ID from the raw response.
func (*RequestIDRetriever) HandleDeserialize ¶ added in v1.25.2
func (m *RequestIDRetriever) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, )
HandleDeserialize pulls the AWS request ID from the response, storing it in operation metadata.
func (*RequestIDRetriever) ID ¶ added in v1.25.2
func (m *RequestIDRetriever) ID() string
ID returns the middleware identifier
type RequestUserAgent ¶ added in v1.25.2
type RequestUserAgent struct {
// contains filtered or unexported fields
}
RequestUserAgent is a build middleware that set the User-Agent for the request.
func NewRequestUserAgent ¶ added in v1.25.2
func NewRequestUserAgent() *RequestUserAgent
NewRequestUserAgent returns a new requestUserAgent which will set the User-Agent and X-Amz-User-Agent for the request.
User-Agent example:
aws-sdk-go-v2/1.2.3
X-Amz-User-Agent example:
aws-sdk-go-v2/1.2.3 md/GOOS/linux md/GOARCH/amd64 lang/go/1.15
func (*RequestUserAgent) AddSDKAgentKey ¶ added in v1.25.2
func (u *RequestUserAgent) AddSDKAgentKey(keyType SDKAgentKeyType, key string)
AddSDKAgentKey adds the component identified by name to the User-Agent string.
func (*RequestUserAgent) AddSDKAgentKeyValue ¶ added in v1.25.2
func (u *RequestUserAgent) AddSDKAgentKeyValue(keyType SDKAgentKeyType, key, value string)
AddSDKAgentKeyValue adds the key identified by the given name and value to the User-Agent string.
func (*RequestUserAgent) AddUserAgentFeature ¶ added in v1.29.0
func (u *RequestUserAgent) AddUserAgentFeature(feature UserAgentFeature)
AddUserAgentFeature adds the feature ID to the tracking list to be emitted in the final User-Agent string.
func (*RequestUserAgent) AddUserAgentKey ¶ added in v1.25.2
func (u *RequestUserAgent) AddUserAgentKey(key string)
AddUserAgentKey adds the component identified by name to the User-Agent string.
func (*RequestUserAgent) AddUserAgentKeyValue ¶ added in v1.25.2
func (u *RequestUserAgent) AddUserAgentKeyValue(key, value string)
AddUserAgentKeyValue adds the key identified by the given name and value to the User-Agent string.
func (*RequestUserAgent) HandleBuild ¶ added in v1.25.2
func (u *RequestUserAgent) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( out middleware.BuildOutput, metadata middleware.Metadata, err error, )
HandleBuild adds or appends the constructed user agent to the request.
func (*RequestUserAgent) ID ¶ added in v1.25.2
func (u *RequestUserAgent) ID() string
ID the name of the middleware.
type SDKAgentKeyType ¶ added in v1.0.0
type SDKAgentKeyType int
SDKAgentKeyType is the metadata type to add to the SDK agent string
const ( APIMetadata SDKAgentKeyType OperatingSystemMetadata LanguageMetadata EnvironmentMetadata FeatureMetadata ConfigMetadata FrameworkMetadata AdditionalMetadata ApplicationIdentifier FeatureMetadata2 )
The set of valid SDKAgentKeyType constants. If an unknown value is assigned for SDKAgentKeyType it will be mapped to AdditionalMetadata.
type UserAgentFeature ¶ added in v1.29.0
type UserAgentFeature string
UserAgentFeature enumerates tracked SDK features.