Documentation ¶
Index ¶
Constants ¶
View Source
const ( // example: https://bucket-name.s3.region-code.amazonaws.com/key-name VirtualHostedStyle s3RequestStyle = "virtual-hosted-style" // example: https://s3.region-code.amazonaws.com/bucket-name/key-name PathStyle s3RequestStyle = "path-style" )
Variables ¶
This section is empty.
Functions ¶
func NewRequest ¶
func NewRequest(ctx context.Context, logger *zap.Logger, req *http.Request, sourceBucket SourceBucket, opts ...func(*Options)) (*http.Request, error)
NewRequest creates a standard aws s3 request
Types ¶
type SourceBucket ¶
func ExtractSourceBucket ¶
func ExtractSourceBucket(req *http.Request) (SourceBucket, error)
extractSourceBucket extracts the aws request bucket using Path-style or Virtual-hosted-style requests. https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html This method will error if the bucket cannot be extracted from the request.
Click to show internal directories.
Click to hide internal directories.