Sha256: 9c6f85f6b3ba6fb3568ce3d2aeb497ddebda25826df42bd402cc3b3973395737

Contents?: true

Size: 744 Bytes

Versions: 16

Compression:

Stored size: 744 Bytes

Contents

package middleware

import (
	"github.com/aws/smithy-go/middleware"
)

// requestIDKey is used to retrieve request id from response metadata
type requestIDKey struct{}

// SetRequestIDMetadata sets the provided request id over middleware metadata
func SetRequestIDMetadata(metadata *middleware.Metadata, id string) {
	metadata.Set(requestIDKey{}, id)
}

// GetRequestIDMetadata retrieves the request id from middleware metadata
// returns string and bool indicating value of request id, whether request id was set.
func GetRequestIDMetadata(metadata middleware.Metadata) (string, bool) {
	if !metadata.Has(requestIDKey{}) {
		return "", false
	}

	v, ok := metadata.Get(requestIDKey{}).(string)
	if !ok {
		return "", true
	}
	return v, true
}

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ruby_snowflake_client-1.3.7 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go
ruby_snowflake_client-1.3.6 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go
ruby_snowflake_client-1.3.5 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go
ruby_snowflake_client-1.3.4 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go
ruby_snowflake_client-1.3.4.pre.debug ext/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go
ruby_snowflake_client-1.3.3.pre.debug ext/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go
ruby_snowflake_client-1.3.2 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go
ruby_snowflake_client-1.3.1 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go
ruby_snowflake_client-1.3.0 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go
ruby_snowflake_client-1.2.1 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go
ruby_snowflake_client-1.2.0 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go
ruby_snowflake_client-1.1.1 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go
ruby_snowflake_client-1.1.0 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go
ruby_snowflake_client-1.0.2 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go
ruby_snowflake_client-1.0.1 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go
ruby_snowflake_client-1.0.0 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go