Documentation ¶
Index ¶
- func AddToGetObject(input *s3.GetObjectInput, header http.Header) *s3.GetObjectInput
- func AddToHeadObject(input *s3.HeadObjectInput, header http.Header) *s3.HeadObjectInput
- func HeadersFromGetObjectOutput(output *s3.GetObjectOutput, cb func(k, v string))
- func HeadersFromHeadObjectOutput(output *s3.HeadObjectOutput, cb func(k, v string))
- func IsNoSuchKey(err error) bool
- type URIWithOwner
- func (u URIWithOwner) Append(key string) URIWithOwner
- func (u URIWithOwner) Get(input *s3.GetObjectInput) *s3.GetObjectInput
- func (u URIWithOwner) GoString() string
- func (u URIWithOwner) Head(input *s3.HeadObjectInput) *s3.HeadObjectInput
- func (u URIWithOwner) Put(input *s3.PutObjectInput) *s3.PutObjectInput
- func (u URIWithOwner) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddToGetObject ¶
func AddToGetObject(input *s3.GetObjectInput, header http.Header) *s3.GetObjectInput
AddToGetObject adds conditional request headers to the s3.GetObjectInput and return the same input.
Specifically, these headers are parsed from the "header" argument:
- If-Match and If-None-Match
- If-Modified-Since and If-Unmodified-Since
- Range
func AddToHeadObject ¶
func AddToHeadObject(input *s3.HeadObjectInput, header http.Header) *s3.HeadObjectInput
AddToHeadObject adds conditional request headers to the s3.HeadObjectInput and return the same input.
Specifically, these headers are parsed from the "header" argument:
- If-Match and If-None-Match
- If-Modified-Since and If-Unmodified-Since
- Range
func HeadersFromGetObjectOutput ¶
func HeadersFromGetObjectOutput(output *s3.GetObjectOutput, cb func(k, v string))
HeadersFromGetObjectOutput parses response headers from the s3.GetObjectOutput and passes it to the callback.
func HeadersFromHeadObjectOutput ¶
func HeadersFromHeadObjectOutput(output *s3.HeadObjectOutput, cb func(k, v string))
HeadersFromHeadObjectOutput parses response headers from the s3.HeadObjectOutput and passes it to the callback.
func IsNoSuchKey ¶
IsNoSuchKey returns true if the error's smithy.APIError.ErrorCode returns "NoSuchKey".
The documentation at https://aws.github.io/aws-sdk-go-v2/docs/handling-errors/#api-error-responses doesn't work for [github.com/aws/aws-sdk-go-v2/service/s3/types#NoSuchKey] (maybe you have better luck?) but this works for me.
Types ¶
type URIWithOwner ¶
URIWithOwner contains required Bucket, Key, and ExpectedBucketOwner fields.
func Parse ¶
func Parse(rawURL string) (value URIWithOwner, err error)
Parse parses a URL in expected format s3://bucket[owner]/key.
Only the bucket name and expected bucket owner is required. The key can be empty, or can be a prefix that possibly ends in "/".
func (URIWithOwner) Append ¶
func (u URIWithOwner) Append(key string) URIWithOwner
Append creates a new URIWithOwner by appending the given key to the existing key.
The new key is a simple concatenation of existing key + new key without any '/' separator.
func (URIWithOwner) Get ¶
func (u URIWithOwner) Get(input *s3.GetObjectInput) *s3.GetObjectInput
Get decorates the given s3.GetObjectInput the fields from the URIWithOwner.
If given a nil input, a new one will be created.
func (URIWithOwner) GoString ¶
func (u URIWithOwner) GoString() string
GoString returns s3://bucket[owner]/key, or s3://bucket[owner] if key is empty string.
func (URIWithOwner) Head ¶
func (u URIWithOwner) Head(input *s3.HeadObjectInput) *s3.HeadObjectInput
Head decorates the given s3.HeadObjectInput the fields from the URIWithOwner.
If given a nil input, a new one will be created.
func (URIWithOwner) Put ¶
func (u URIWithOwner) Put(input *s3.PutObjectInput) *s3.PutObjectInput
Put decorates the given s3.PutObjectInput the fields from the URIWithOwner.
If given a nil input, a new one will be created.
func (URIWithOwner) String ¶
func (u URIWithOwner) String() string
String returns s3://bucket/key, or s3://bucket if key is empty string.