Sha256: e1cfacfe24943a164a08a4454f5e7ea986c1c19c15edb3d34fdd9ca3b57f0b30

Contents?: true

Size: 891 Bytes

Versions: 16

Compression:

Stored size: 891 Bytes

Contents

package s3shared

import (
	"context"

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

// clonedInputKey used to denote if request input was cloned.
type clonedInputKey struct{}

// 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.
func SetClonedInputKey(ctx context.Context, value bool) context.Context {
	return middleware.WithStackValue(ctx, clonedInputKey{}, value)
}

// 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.
func IsClonedInput(ctx context.Context) bool {
	v, _ := middleware.GetStackValue(ctx, clonedInputKey{}).(bool)
	return v
}

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/metadata.go
ruby_snowflake_client-1.3.6 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/metadata.go
ruby_snowflake_client-1.3.5 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/metadata.go
ruby_snowflake_client-1.3.4 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/metadata.go
ruby_snowflake_client-1.3.4.pre.debug ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/metadata.go
ruby_snowflake_client-1.3.3.pre.debug ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/metadata.go
ruby_snowflake_client-1.3.2 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/metadata.go
ruby_snowflake_client-1.3.1 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/metadata.go
ruby_snowflake_client-1.3.0 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/metadata.go
ruby_snowflake_client-1.2.1 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/metadata.go
ruby_snowflake_client-1.2.0 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/metadata.go
ruby_snowflake_client-1.1.1 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/metadata.go
ruby_snowflake_client-1.1.0 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/metadata.go
ruby_snowflake_client-1.0.2 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/metadata.go
ruby_snowflake_client-1.0.1 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/metadata.go
ruby_snowflake_client-1.0.0 ext/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/metadata.go