customizations

package
v1.25.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSignerVersion

func GetSignerVersion(ctx context.Context) (v string)

GetSignerVersion retrieves the signer version to use for signing

Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues to clear all stack values.

func HandleResponseErrorWith200Status

func HandleResponseErrorWith200Status(stack *middleware.Stack) error

HandleResponseErrorWith200Status check for S3 200 error response. If an s3 200 error is found, status code for the response is modified temporarily to 5xx response status code.

func RegisterPreSigningMiddleware

func RegisterPreSigningMiddleware(stack *middleware.Stack, signingMiddleware *PresignHTTPRequestMiddleware) (err error)

RegisterPreSigningMiddleware registers the wrapper pre-signing middleware to the stack. If a pre-signing middleware is already present, this provided middleware will be swapped. Otherwise the middleware will be added at the tail of the finalize step.

func RegisterSigningMiddleware

func RegisterSigningMiddleware(stack *middleware.Stack, signingMiddleware *SignHTTPRequestMiddleware) (err error)

RegisterSigningMiddleware registers the wrapper signing middleware to the stack. If a signing middleware is already present, this provided middleware will be swapped. Otherwise the middleware will be added at the tail of the finalize step.

func SetSignerVersion

func SetSignerVersion(ctx context.Context, version string) context.Context

SetSignerVersion sets the signer version to be used for signing the request

Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues to clear all stack values.

func UpdateEndpoint

func UpdateEndpoint(stack *middleware.Stack, options UpdateEndpointOptions) (err error)

UpdateEndpoint adds the middleware to the middleware stack based on the UpdateEndpointOptions.

Types

type EndpointResolver

type EndpointResolver interface {
	ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
}

EndpointResolver interface for resolving service endpoints.

type EndpointResolverOptions

type EndpointResolverOptions = internalendpoints.Options

EndpointResolverOptions is the service endpoint resolver options

type PresignHTTPRequestMiddleware

type PresignHTTPRequestMiddleware struct {
	// contains filtered or unexported fields
}

PresignHTTPRequestMiddleware provides the Finalize middleware for creating a presigned URL for an HTTP request.

Will short circuit the middleware stack and not forward onto the next Finalize handler.

func NewPresignHTTPRequestMiddleware

func NewPresignHTTPRequestMiddleware(options PresignHTTPRequestMiddlewareOptions) *PresignHTTPRequestMiddleware

NewPresignHTTPRequestMiddleware constructs a PresignHTTPRequestMiddleware using the given Signer for signing requests

func (*PresignHTTPRequestMiddleware) HandleFinalize

HandleFinalize will take the provided input and create a presigned url for the http request using the SigV4 or SigV4a presign authentication scheme.

Since the signed request is not a valid HTTP request

func (*PresignHTTPRequestMiddleware) ID

ID provides the middleware ID.

type PresignHTTPRequestMiddlewareOptions

type PresignHTTPRequestMiddlewareOptions struct {
	CredentialsProvider aws.CredentialsProvider
	V4Presigner         v4.HTTPPresigner
	V4aPresigner        v4a.HTTPPresigner
	LogSigning          bool
}

PresignHTTPRequestMiddlewareOptions is the options for the PresignHTTPRequestMiddleware middleware.

type SignHTTPRequestMiddleware

type SignHTTPRequestMiddleware struct {
	// contains filtered or unexported fields
}

SignHTTPRequestMiddleware is a `FinalizeMiddleware` implementation to select HTTP Signing method

func NewSignHTTPRequestMiddleware

func NewSignHTTPRequestMiddleware(options SignHTTPRequestMiddlewareOptions) *SignHTTPRequestMiddleware

NewSignHTTPRequestMiddleware constructs a SignHTTPRequestMiddleware using the given Signer for signing requests

func (*SignHTTPRequestMiddleware) HandleFinalize

HandleFinalize will take the provided input and sign the request using the SigV4 authentication scheme

func (*SignHTTPRequestMiddleware) ID

ID is the SignHTTPRequestMiddleware identifier

type SignHTTPRequestMiddlewareOptions

type SignHTTPRequestMiddlewareOptions struct {

	// credential provider
	CredentialsProvider aws.CredentialsProvider

	// log signing
	LogSigning bool

	// v4 signer
	V4Signer v4.HTTPSigner

	//v4a signer
	V4aSigner v4a.HTTPSigner
}

SignHTTPRequestMiddlewareOptions is the configuration options for the SignHTTPRequestMiddleware middleware.

type UpdateEndpointOptions

type UpdateEndpointOptions struct {
	// Accessor are parameter accessors used by the middleware
	Accessor UpdateEndpointParameterAccessor

	// use path style
	UsePathStyle bool

	// use transfer acceleration
	UseAccelerate bool

	// indicates if an operation supports s3 transfer acceleration.
	SupportsAccelerate bool

	// use ARN region
	UseARNRegion bool

	// Indicates that the operation should target the s3-object-lambda endpoint.
	// Used to direct operations that do not route based on an input ARN.
	TargetS3ObjectLambda bool

	// EndpointResolver used to resolve endpoints. This may be a custom endpoint resolver
	EndpointResolver EndpointResolver

	// EndpointResolverOptions used by endpoint resolver
	EndpointResolverOptions EndpointResolverOptions

	// DisableMultiRegionAccessPoints indicates multi-region access point support is disabled
	DisableMultiRegionAccessPoints bool
}

UpdateEndpointOptions provides the options for the UpdateEndpoint middleware setup.

type UpdateEndpointParameterAccessor

type UpdateEndpointParameterAccessor struct {
	// functional pointer to fetch bucket name from provided input.
	// The function is intended to take an input value, and
	// return a string pointer to value of string, and bool if
	// input has no bucket member.
	GetBucketFromInput func(interface{}) (*string, bool)
}

UpdateEndpointParameterAccessor represents accessor functions used by the middleware

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL