Sha256: 1731e7684127a2db453015c4808d13d47eb20ced3924695f7e6f3a3411f0305e

Contents?: true

Size: 713 Bytes

Versions: 16

Compression:

Stored size: 713 Bytes

Contents

package s3shared

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

// hostID is used to retrieve host id from response metadata
type hostID struct {
}

// SetHostIDMetadata sets the provided host id over middleware metadata
func SetHostIDMetadata(metadata *middleware.Metadata, id string) {
	metadata.Set(hostID{}, id)
}

// 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 GetHostIDMetadata(metadata middleware.Metadata) (string, bool) {
	if !metadata.Has(hostID{}) {
		return "", false
	}

	v, ok := metadata.Get(hostID{}).(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/service/internal/s3shared/host_id.go
ruby_snowflake_client-1.3.6 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/host_id.go
ruby_snowflake_client-1.3.5 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/host_id.go
ruby_snowflake_client-1.3.4 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/host_id.go
ruby_snowflake_client-1.3.4.pre.debug ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/host_id.go
ruby_snowflake_client-1.3.3.pre.debug ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/host_id.go
ruby_snowflake_client-1.3.2 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/host_id.go
ruby_snowflake_client-1.3.1 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/host_id.go
ruby_snowflake_client-1.3.0 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/host_id.go
ruby_snowflake_client-1.2.1 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/host_id.go
ruby_snowflake_client-1.2.0 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/host_id.go
ruby_snowflake_client-1.1.1 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/host_id.go
ruby_snowflake_client-1.1.0 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/host_id.go
ruby_snowflake_client-1.0.2 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/host_id.go
ruby_snowflake_client-1.0.1 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/host_id.go
ruby_snowflake_client-1.0.0 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/host_id.go