Documentation
¶
Index ¶
Constants ¶
View Source
const S3EndpointEnvVar = "AWS_ENDPOINT_URL_S3"
S3EndpointEnvVar overrides the endpoint for S3 alone, which is how a development session points at a local emulator while everything else stays on AWS.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface {
GetObject(context.Context, *s3.GetObjectInput, ...func(*s3.Options)) (*s3.GetObjectOutput, error)
DeleteObject(context.Context, *s3.DeleteObjectInput, ...func(*s3.Options)) (*s3.DeleteObjectOutput, error)
ListObjectsV2(context.Context, *s3.ListObjectsV2Input, ...func(*s3.Options)) (*s3.ListObjectsV2Output, error)
CopyObject(context.Context, *s3.CopyObjectInput, ...func(*s3.Options)) (*s3.CopyObjectOutput, error)
DeleteObjects(context.Context, *s3.DeleteObjectsInput, ...func(*s3.Options)) (*s3.DeleteObjectsOutput, error)
ListObjectVersions(
context.Context, *s3.ListObjectVersionsInput, ...func(*s3.Options),
) (*s3.ListObjectVersionsOutput, error)
// The rest are what the transfer manager needs, which is what writes an
// object: a body small enough goes as one PutObject and a larger one is cut
// into parts.
PutObject(context.Context, *s3.PutObjectInput, ...func(*s3.Options)) (*s3.PutObjectOutput, error)
HeadObject(context.Context, *s3.HeadObjectInput, ...func(*s3.Options)) (*s3.HeadObjectOutput, error)
CreateMultipartUpload(context.Context, *s3.CreateMultipartUploadInput, ...func(*s3.Options)) (*s3.CreateMultipartUploadOutput, error)
UploadPart(context.Context, *s3.UploadPartInput, ...func(*s3.Options)) (*s3.UploadPartOutput, error)
CompleteMultipartUpload(context.Context, *s3.CompleteMultipartUploadInput, ...func(*s3.Options)) (*s3.CompleteMultipartUploadOutput, error)
AbortMultipartUpload(context.Context, *s3.AbortMultipartUploadInput, ...func(*s3.Options)) (*s3.AbortMultipartUploadOutput, error)
}
API is what this package calls on S3. This is narrow on purpose, it is also the list of what a handler reaching a bucket needs permission to do.
type PresignAPI ¶
type PresignAPI interface {
PresignGetObject(
context.Context, *s3.GetObjectInput, ...func(*s3.PresignOptions),
) (*v4.PresignedHTTPRequest, error)
PresignPutObject(
context.Context, *s3.PutObjectInput, ...func(*s3.PresignOptions),
) (*v4.PresignedHTTPRequest, error)
}
PresignAPI is presigning, which is a separate client rather than a call and so a separate seam.
Presigning doesn't make any requests, a signature is computed from the credentials the process already holds, so neither of these is a permission a handler needs. What the URL is used for is, but that is the holder of the URL doing it.
Click to show internal directories.
Click to hide internal directories.