Struct: middleware.RequestUserAgent
Overview
RequestUserAgent is a build middleware that set the User-Agent for the request.
Implemented Interfaces
types.AnalyticsFilter, v4.HTTPPresigner, s3.HTTPPresignerV4, types.MetricsFilter, s3.PresignPost, arn.S3ObjectLambdaARN, types.SelectObjectContentEventStream
Constructor Functions collapse
-
func NewRequestUserAgent() *RequestUserAgent
NewRequestUserAgent returns a new requestUserAgent which will set the User-Agent and X-Amz-User-Agent for the request.
Method Summary collapse
-
func (u *RequestUserAgent) AddCredentialsSource(source aws.CredentialSource)
AddCredentialsSource adds the credential source as a feature on the User-Agent string.
-
func (u *RequestUserAgent) AddSDKAgentKey(keyType SDKAgentKeyType, key string)
AddSDKAgentKey adds the component identified by name to the User-Agent string.
-
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 (u *RequestUserAgent) AddUserAgentFeature(feature UserAgentFeature)
AddUserAgentFeature adds the feature ID to the tracking list to be emitted in the final User-Agent string.
-
func (u *RequestUserAgent) AddUserAgentKey(key string)
AddUserAgentKey adds the component identified by name to the User-Agent string.
-
func (u *RequestUserAgent) AddUserAgentKeyValue(key, value string)
AddUserAgentKeyValue adds the key identified by the given name and value to the User-Agent string.
-
func (u *RequestUserAgent) ID() string
ID the name of the middleware.
Function Details
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:
ibm-cos-sdk-go-v2/1.2.3
X-Amz-User-Agent example:
ibm-cos-sdk-go-v2/1.2.3 md/GOOS/linux md/GOARCH/amd64 lang/go/1.15
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
// File 'aws/middleware/user_agent.go', line 178
|
Method Details
func (u *RequestUserAgent) AddCredentialsSource(source aws.CredentialSource)
AddCredentialsSource adds the credential source as a feature on the User-Agent string
315 316 317 318 319 320 |
// File 'aws/middleware/user_agent.go', line 315
|
func (u *RequestUserAgent) AddSDKAgentKey(keyType SDKAgentKeyType, key string)
AddSDKAgentKey adds the component identified by name to the User-Agent string.
303 304 305 306 |
// File 'aws/middleware/user_agent.go', line 303
|
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.
309 310 311 312 |
// File 'aws/middleware/user_agent.go', line 309
|
func (u *RequestUserAgent) AddUserAgentFeature(feature UserAgentFeature)
AddUserAgentFeature adds the feature ID to the tracking list to be emitted in the final User-Agent string.
298 299 300 |
// File 'aws/middleware/user_agent.go', line 298
|
func (u *RequestUserAgent) AddUserAgentKey(key string)
AddUserAgentKey adds the component identified by name to the User-Agent string.
287 288 289 |
// File 'aws/middleware/user_agent.go', line 287
|
func (u *RequestUserAgent) AddUserAgentKeyValue(key, value string)
AddUserAgentKeyValue adds the key identified by the given name and value to the User-Agent string.
292 293 294 |
// File 'aws/middleware/user_agent.go', line 292
|
func (u *RequestUserAgent) ID() string
ID the name of the middleware.
323 324 325 |
// File 'aws/middleware/user_agent.go', line 323
|