Documentation
¶
Index ¶
- Variables
- type APIError
- func GetAPIError(code ErrorCode) APIError
- func GetChecksumBadDigestErr(algo types.ChecksumAlgorithm) APIError
- func GetChecksumSchemaMismatchErr(algo types.ChecksumAlgorithm, t types.ChecksumType) APIError
- func GetChecksumTypeMismatchErr(expected, actual types.ChecksumAlgorithm) APIError
- func GetChecksumTypeMismatchOnMpErr(t types.ChecksumType) APIError
- func GetCopySourceObjectTooLargeErr(limit int64) APIError
- func GetIncorrectMpObjectSizeErr(expected, actual int64) APIError
- func GetInvalidCORSHeaderErr(header string) APIError
- func GetInvalidCORSMethodErr(method string) APIError
- func GetInvalidCORSRequestHeaderErr(header string) APIError
- func GetInvalidChecksumHeaderErr(header string) APIError
- func GetInvalidHTTPErrorCodeErr(input int) APIError
- func GetInvalidMpObjectSizeErr(val string) APIError
- func GetInvalidRedirectCodeErr(input int) APIError
- func GetInvalidTrailingChecksumHeaderErr(header string) APIError
- func GetMultipleWildcardCORSOriginErr(origin string) APIError
- func GetNegatvieMpObjectSizeErr(val int64) APIError
- func GetUnsopportedCORSMethodErr(method string) APIError
- func GetWebsiteRoutingRulesLimitedErr(rules int) APIError
- type AccessForbiddenError
- type BadDigestError
- type BucketError
- type Condition
- type ContentSHA256MismatchError
- type EntityTooLargeError
- type EntityTooSmallError
- type ErrorCode
- type ErrorField
- type ExpiredPresignedURLError
- type HeadersNotSignedError
- type InvalidAccessKeyIdError
- type InvalidArgErrorCode
- type InvalidArgumentError
- func GetInvalidArgExceedingRange(size int64) InvalidArgumentError
- func GetInvalidArgMaxLimiter(name, value string) InvalidArgumentError
- func GetInvalidArgNegativeMaxLimiter(name, value string) InvalidArgumentError
- func GetInvalidArgObjectOwnership(value string) InvalidArgumentError
- func GetInvalidArgumentErr(code InvalidArgErrorCode, value string) InvalidArgumentError
- type InvalidChunkSizeError
- type InvalidDigestError
- type InvalidLocationConstraintError
- type InvalidPartError
- type InvalidPartNumberRangeError
- type InvalidRangeError
- type InvalidTagError
- type KeyTooLongError
- type MalformedAuthError
- type MaxMessageLengthExceeded
- type MetadataTooLargeError
- type MethodNotAllowedError
- type NmpAdditionalMessage
- type NoSuchUploadError
- type NoSuchVersionError
- type NotImplementedError
- type PreconditionFailedError
- type RequestHeaderSectionTooLargeError
- type RequestTimeTooSkewedError
- type ResourceType
- type S3Error
- type SignatureDoesNotMatchError
Constants ¶
This section is empty.
Variables ¶
var InvalidPolicyDocument invalidPolicyDocument
var MalformedAuth malformedAuthErrors
var PostAuth invalidPostAuthErr
var QueryAuthErrors queryAuthErrors
Functions ¶
This section is empty.
Types ¶
type APIError ¶
APIError structure
func GetAPIError ¶
GetAPIError provides API Error for input API error code.
func GetChecksumBadDigestErr ¶ added in v1.0.11
func GetChecksumBadDigestErr(algo types.ChecksumAlgorithm) APIError
Returns incorrect checksum APIError
func GetChecksumSchemaMismatchErr ¶ added in v1.0.11
func GetChecksumSchemaMismatchErr(algo types.ChecksumAlgorithm, t types.ChecksumType) APIError
Returns checksum type mismatch error with checksum algorithm
func GetChecksumTypeMismatchErr ¶ added in v1.0.11
func GetChecksumTypeMismatchErr(expected, actual types.ChecksumAlgorithm) APIError
Returns checksum type mismatch APIError
func GetChecksumTypeMismatchOnMpErr ¶ added in v1.0.11
func GetChecksumTypeMismatchOnMpErr(t types.ChecksumType) APIError
Returns checksum type mismatch error for multipart uploads
func GetCopySourceObjectTooLargeErr ¶ added in v1.4.0
func GetIncorrectMpObjectSizeErr ¶ added in v1.0.11
func GetInvalidCORSHeaderErr ¶ added in v1.0.17
func GetInvalidCORSMethodErr ¶ added in v1.0.17
func GetInvalidCORSRequestHeaderErr ¶ added in v1.0.17
func GetInvalidChecksumHeaderErr ¶ added in v1.0.11
Returns invalid checksum error with the provided header in the error description
func GetInvalidHTTPErrorCodeErr ¶ added in v1.6.0
func GetInvalidMpObjectSizeErr ¶ added in v1.0.11
func GetInvalidRedirectCodeErr ¶ added in v1.6.0
func GetInvalidTrailingChecksumHeaderErr ¶ added in v1.0.13
func GetMultipleWildcardCORSOriginErr ¶ added in v1.3.0
func GetNegatvieMpObjectSizeErr ¶ added in v1.0.17
func GetUnsopportedCORSMethodErr ¶ added in v1.0.17
func GetWebsiteRoutingRulesLimitedErr ¶ added in v1.6.0
func (APIError) StatusCode ¶ added in v1.5.0
type AccessForbiddenError ¶ added in v1.5.0
type AccessForbiddenError struct {
APIError
Method string
ResourceType ResourceType
}
AccessForbiddenError is returned when a CORS request is not allowed. Produces <Method> and <ResourceType> fields in the XML response.
func GetAccessForbiddenErr ¶ added in v1.5.0
func GetAccessForbiddenErr(code ErrorCode, method string, resourceType ResourceType) AccessForbiddenError
func (AccessForbiddenError) HTMLBody ¶ added in v1.6.0
func (e AccessForbiddenError) HTMLBody(requestID, hostID string) []byte
func (AccessForbiddenError) Is ¶ added in v1.5.0
func (e AccessForbiddenError) Is(target error) bool
func (AccessForbiddenError) XMLBody ¶ added in v1.5.0
func (e AccessForbiddenError) XMLBody(requestID, hostID string) []byte
type BadDigestError ¶ added in v1.5.0
BadDigestError is returned when the Content-MD5 does not match the received data. Produces <CalculatedDigest> and <ExpectedDigest> fields in the XML response.
func GetBadDigestErr ¶ added in v1.5.0
func GetBadDigestErr(calculated, expected string) BadDigestError
func (BadDigestError) HTMLBody ¶ added in v1.6.0
func (e BadDigestError) HTMLBody(requestID, hostID string) []byte
func (BadDigestError) Is ¶ added in v1.5.0
func (e BadDigestError) Is(target error) bool
func (BadDigestError) XMLBody ¶ added in v1.5.0
func (e BadDigestError) XMLBody(requestID, hostID string) []byte
type BucketError ¶ added in v1.5.0
BucketError is returned for errors that include the bucket name. Produces a <BucketName> field in the XML response.
func GetBucketErr ¶ added in v1.5.0
func GetBucketErr(code ErrorCode, bucket string) BucketError
GetBucketErr creates a BucketError for the given error code and bucket name. Use for: ErrNoSuchBucketPolicy, ErrOwnershipControlsNotFound, ErrBucketNotEmpty, ErrNoSuchCORSConfiguration, and similar errors that should include the bucket name.
func (BucketError) HTMLBody ¶ added in v1.6.0
func (e BucketError) HTMLBody(requestID, hostID string) []byte
func (BucketError) Is ¶ added in v1.5.0
func (e BucketError) Is(target error) bool
func (BucketError) XMLBody ¶ added in v1.5.0
func (e BucketError) XMLBody(requestID, hostID string) []byte
type Condition ¶ added in v1.5.0
type Condition string
const ( ConditionIfMatch Condition = "If-Match" ConditionIfNoneMatch Condition = "If-None-Match" ConditionIfUnmodifiedSince Condition = "If-Unmodified-Since" ConditionIfMatchSize Condition = "If-Match-Size" ConditionIfMatchInitiatedTime Condition = "If-Match-Initiated-Time" ConditionIfMatchLastModTime Condition = "If-Match-Last-Mod-Time" ConditionPostBucket Condition = "Bucket POST must be of the enclosure-type multipart/form-data" )
type ContentSHA256MismatchError ¶ added in v1.5.0
type ContentSHA256MismatchError struct {
APIError
ClientComputedContentSHA256 string
S3ComputedContentSHA256 string
}
ContentSHA256MismatchError is returned when the x-amz-content-sha256 header does not match the computed hash of the request payload. Produces <ClientComputedContentSHA256> and <S3ComputedContentSHA256> fields.
func GetContentSHA256MismatchErr ¶ added in v1.5.0
func GetContentSHA256MismatchErr(clientHash, s3Hash string) ContentSHA256MismatchError
func (ContentSHA256MismatchError) HTMLBody ¶ added in v1.6.0
func (e ContentSHA256MismatchError) HTMLBody(requestID, hostID string) []byte
func (ContentSHA256MismatchError) Is ¶ added in v1.5.0
func (e ContentSHA256MismatchError) Is(target error) bool
func (ContentSHA256MismatchError) XMLBody ¶ added in v1.5.0
func (e ContentSHA256MismatchError) XMLBody(requestID, hostID string) []byte
type EntityTooLargeError ¶ added in v1.5.0
EntityTooLargeError is returned when the proposed upload exceeds the maximum allowed size. Produces <ProposedSize> and <MaxSizeAllowed> fields in the XML response.
func GetEntityTooLargeErr ¶ added in v1.5.0
func GetEntityTooLargeErr(proposedSize, maxSizeAllowed int64) EntityTooLargeError
func (EntityTooLargeError) HTMLBody ¶ added in v1.6.0
func (e EntityTooLargeError) HTMLBody(requestID, hostID string) []byte
func (EntityTooLargeError) Is ¶ added in v1.5.0
func (e EntityTooLargeError) Is(target error) bool
func (EntityTooLargeError) XMLBody ¶ added in v1.5.0
func (e EntityTooLargeError) XMLBody(requestID, hostID string) []byte
type EntityTooSmallError ¶ added in v1.5.0
EntityTooSmallError is returned when the proposed upload is smaller than the minimum allowed size. Produces <ProposedSize> and <MinSizeAllowed> fields in the XML response.
func GetEntityTooSmallErr ¶ added in v1.5.0
func GetEntityTooSmallErr(proposedSize, minSizeAllowed int64) EntityTooSmallError
func (EntityTooSmallError) HTMLBody ¶ added in v1.6.0
func (e EntityTooSmallError) HTMLBody(requestID, hostID string) []byte
func (EntityTooSmallError) Is ¶ added in v1.5.0
func (e EntityTooSmallError) Is(target error) bool
func (EntityTooSmallError) XMLBody ¶ added in v1.5.0
func (e EntityTooSmallError) XMLBody(requestID, hostID string) []byte
type ErrorCode ¶
type ErrorCode int
ErrorCode type of error status.
const ( ErrNone ErrorCode = iota ErrAccessDenied ErrAnonymousRequest ErrAnonymousCreateMp ErrAnonymousCopyObject ErrAnonymousPutBucketOwnership ErrAnonymousGetBucketOwnership ErrAnonymousResponseHeaders ErrMethodNotAllowed ErrBucketNotEmpty ErrVersionedBucketNotEmpty ErrBucketAlreadyExists ErrBucketAlreadyOwnedByYou ErrNoSuchBucket ErrNoSuchKey ErrNoSuchUpload ErrInvalidBucketName ErrInvalidDigest ErrBadDigest ErrInvalidPart ErrInvalidPartNumberRange ErrRangeAndPartNumber ErrInvalidPartOrder ErrInternalError ErrNonEmptyRequestBody ErrIncompleteBody ErrInvalidCopyDest ErrInvalidTagKey ErrInvalidTagValue ErrDuplicateTagKey ErrBucketTaggingLimited ErrObjectTaggingLimited ErrCannotParseHTTPRequest ErrMalformedPOSTRequest ErrEntityTooSmall ErrEntityTooLarge ErrMalformedXML ErrMalformedCredentialDate ErrExpiredPresignRequest ErrSignatureDoesNotMatch ErrContentSHA256Mismatch ErrInvalidSHA256PayloadUsage ErrUnsupportedAnonymousSignedStreaming ErrMissingContentLength ErrContentLengthMismatch ErrInvalidAccessKeyID ErrRequestNotReadyYet ErrMissingDateHeader ErrGetUploadsWithKey ErrVersionsWithKey ErrInvalidRequest ErrAuthNotSetup ErrNotImplemented ErrPreconditionFailed ErrInvalidObjectState ErrInvalidRange ErrInvalidURI ErrObjectLockConfigurationNotFound ErrNoSuchObjectLockConfiguration ErrMissingObjectLockConfiguration ErrMissingObjectLockConfigurationNoSpaces ErrObjectLockConfigurationNotAllowed ErrObjectLocked ErrNoSuchBucketPolicy ErrBucketTaggingNotFound ErrObjectAttributesInvalidHeader ErrRequestTimeTooSkewed ErrInvalidBucketAclWithObjectOwnership ErrBothCannedAndHeaderGrants ErrOwnershipControlsNotFound ErrAclNotSupported ErrMalformedACL ErrUnexpectedContent ErrMissingSecurityHeader ErrKeyTooLong ErrNoSuchVersion ErrSuspendedVersioningNotAllowed ErrMissingRequestBody ErrMultipleChecksumHeaders ErrChecksumSDKAlgoMismatch ErrChecksumRequired ErrMissingContentSha256 ErrInvalidChecksumAlgorithm ErrChecksumTypeWithAlgo ErrInvalidChecksumHeader ErrTrailerHeaderNotSupported ErrBadRequest ErrNoSuchCORSConfiguration ErrCORSForbidden ErrMissingCORSOrigin ErrCORSIsNotEnabled ErrNoSuchWebsiteConfiguration ErrInvalidWebsiteRedirectProtocol ErrInvalidRedirectLocation ErrBothReplaceKeyAndPrefix ErrMaxMessageLengthExceeded ErrNotModified ErrInvalidLocationConstraint ErrMalformedTrailer ErrInvalidChunkSize ErrSlowDown ErrMetadataTooLarge ErrRequestHeaderSectionTooLarge ErrUnsupportedAuthorizationMechanism ErrNoBucketInRequest // Non-AWS errors ErrExistingObjectIsDirectory ErrObjectParentIsFile ErrDirectoryObjectContainsData ErrDirectoryNotEmpty ErrQuotaExceeded ErrVersioningNotConfigured ErrACLsDisabled ErrNoSpaceLeftOnDevice // Admin api errors ErrAdminAccessDenied ErrAdminUserNotFound ErrAdminUserExists ErrAdminInvalidUserRole ErrAdminMissingUserAcess ErrAdminMethodNotSupported ErrAdminEmptyBucketOwnerHeader )
Error codes, see full list at http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
type ErrorField ¶ added in v1.6.0
type ExpiredPresignedURLError ¶ added in v1.5.0
ExpiredPresignedURLError is returned when the presigned url is expired Produces <ServerTime>, <X-Amz-Expires> and <Expires> fields in the XML response.
func GetExpiredPresignedURLError ¶ added in v1.5.0
func GetExpiredPresignedURLError(XAmzExpires int, expires, serverTime string) ExpiredPresignedURLError
func (ExpiredPresignedURLError) HTMLBody ¶ added in v1.6.0
func (e ExpiredPresignedURLError) HTMLBody(requestID, hostID string) []byte
func (ExpiredPresignedURLError) Is ¶ added in v1.5.0
func (e ExpiredPresignedURLError) Is(target error) bool
func (ExpiredPresignedURLError) XMLBody ¶ added in v1.5.0
func (e ExpiredPresignedURLError) XMLBody(requestID, hostID string) []byte
type HeadersNotSignedError ¶ added in v1.5.0
HeadersNotSignedError is returned when signature verification receives required signed headers that were omitted from SignedHeaders.
func GetHeadersNotSignedErr ¶ added in v1.5.0
func GetHeadersNotSignedErr(headers []string) HeadersNotSignedError
func (HeadersNotSignedError) Is ¶ added in v1.5.0
func (e HeadersNotSignedError) Is(target error) bool
func (HeadersNotSignedError) XMLBody ¶ added in v1.5.0
func (e HeadersNotSignedError) XMLBody(requestID, hostID string) []byte
type InvalidAccessKeyIdError ¶ added in v1.5.0
InvalidAccessKeyIdError is returned when the provided AWS access key ID does not exist. Produces an <AWSAccessKeyId> field in the XML response.
func GetInvalidAccessKeyIdErr ¶ added in v1.5.0
func GetInvalidAccessKeyIdErr(accessKeyId string) InvalidAccessKeyIdError
func (InvalidAccessKeyIdError) HTMLBody ¶ added in v1.6.0
func (e InvalidAccessKeyIdError) HTMLBody(requestID, hostID string) []byte
func (InvalidAccessKeyIdError) Is ¶ added in v1.5.0
func (e InvalidAccessKeyIdError) Is(target error) bool
func (InvalidAccessKeyIdError) XMLBody ¶ added in v1.5.0
func (e InvalidAccessKeyIdError) XMLBody(requestID, hostID string) []byte
type InvalidArgErrorCode ¶ added in v1.5.0
type InvalidArgErrorCode int
const ( InvalidArgMaxBuckets InvalidArgErrorCode = iota InvalidArgNegativeMaxKeys InvalidArgObjectAttributes InvalidArgPartNumber InvalidArgCompleteMpPartNumber InvalidArgCopySourceRange InvalidArgCopySourceBucket InvalidArgCopySourceObject InvalidArgCopySourceEncoding InvalidArgURLEncodedTagging InvalidArgAuthHeader InvalidArgAuthorizationType InvalidArgPOSTFileRequired InvalidArgSHA256Payload InvalidArgCopySource InvalidArgRetainUntilDate InvalidArgPastObjectLockRetainDate InvalidArgObjectLockRetentionDays InvalidArgObjectLockRetentionYears InvalidArgObjectLockRetentionDaysTooLarge InvalidArgObjectLockRetentionYearsTooLarge InvalidArgMissingObjectLockRetainDate InvalidArgMissingObjectLockMode InvalidArgLegalHoldStatus InvalidArgObjectLockMode InvalidArgMetadataDirective InvalidArgTaggingDirective InvalidArgVersionId InvalidArgChecksumPart InvalidArgMissingUploadId InvalidArgUploadIdMarker InvalidArgCannedAcl InvalidArgOnlyAws4HmacSha256 InvalidArgDateHeader InvalidArgIndexDocumentSuffix InvalidArgErrorDocumentKey )
type InvalidArgumentError ¶ added in v1.5.0
InvalidArgumentError is returned when a request argument is invalid. Produces <ArgumentName> and <ArgumentValue> fields in the XML response.
func GetInvalidArgExceedingRange ¶ added in v1.5.0
func GetInvalidArgExceedingRange(size int64) InvalidArgumentError
func GetInvalidArgMaxLimiter ¶ added in v1.5.0
func GetInvalidArgMaxLimiter(name, value string) InvalidArgumentError
func GetInvalidArgNegativeMaxLimiter ¶ added in v1.5.0
func GetInvalidArgNegativeMaxLimiter(name, value string) InvalidArgumentError
func GetInvalidArgObjectOwnership ¶ added in v1.5.0
func GetInvalidArgObjectOwnership(value string) InvalidArgumentError
func GetInvalidArgumentErr ¶ added in v1.5.0
func GetInvalidArgumentErr(code InvalidArgErrorCode, value string) InvalidArgumentError
func (InvalidArgumentError) BaseError ¶ added in v1.5.0
func (e InvalidArgumentError) BaseError() APIError
func (InvalidArgumentError) Error ¶ added in v1.5.0
func (e InvalidArgumentError) Error() string
func (InvalidArgumentError) HTMLBody ¶ added in v1.6.0
func (e InvalidArgumentError) HTMLBody(requestID, hostID string) []byte
func (InvalidArgumentError) StatusCode ¶ added in v1.5.0
func (e InvalidArgumentError) StatusCode() int
InvalidArgumentError http status code is always 400
func (InvalidArgumentError) XMLBody ¶ added in v1.5.0
func (e InvalidArgumentError) XMLBody(requestID, hostID string) []byte
type InvalidChunkSizeError ¶ added in v1.5.0
InvalidChunkSizeError is returned when a chunk size in a streaming upload is invalid. Produces <Chunk> and <BadChunkSize> fields in the XML response.
func GetInvalidChunkSizeErr ¶ added in v1.5.0
func GetInvalidChunkSizeErr(chunk int, badChunkSize int64) InvalidChunkSizeError
func (InvalidChunkSizeError) HTMLBody ¶ added in v1.6.0
func (e InvalidChunkSizeError) HTMLBody(requestID, hostID string) []byte
func (InvalidChunkSizeError) Is ¶ added in v1.5.0
func (e InvalidChunkSizeError) Is(target error) bool
func (InvalidChunkSizeError) XMLBody ¶ added in v1.5.0
func (e InvalidChunkSizeError) XMLBody(requestID, hostID string) []byte
type InvalidDigestError ¶ added in v1.5.0
InvalidDigestError is returned when the Content-MD5 header value is invalid. Produces a <Content-MD5> field in the XML response.
func GetInvalidDigestErr ¶ added in v1.5.0
func GetInvalidDigestErr(contentMD5 string) InvalidDigestError
func (InvalidDigestError) HTMLBody ¶ added in v1.6.0
func (e InvalidDigestError) HTMLBody(requestID, hostID string) []byte
func (InvalidDigestError) Is ¶ added in v1.5.0
func (e InvalidDigestError) Is(target error) bool
func (InvalidDigestError) XMLBody ¶ added in v1.5.0
func (e InvalidDigestError) XMLBody(requestID, hostID string) []byte
type InvalidLocationConstraintError ¶ added in v1.5.0
InvalidLocationConstraintError is returned when an invalid location constraint is provided. Produces a <LocationConstraint> field in the XML response.
func GetInvalidLocationConstraintErr ¶ added in v1.5.0
func GetInvalidLocationConstraintErr(constraint string) InvalidLocationConstraintError
func (InvalidLocationConstraintError) HTMLBody ¶ added in v1.6.0
func (e InvalidLocationConstraintError) HTMLBody(requestID, hostID string) []byte
func (InvalidLocationConstraintError) Is ¶ added in v1.5.0
func (e InvalidLocationConstraintError) Is(target error) bool
func (InvalidLocationConstraintError) XMLBody ¶ added in v1.5.0
func (e InvalidLocationConstraintError) XMLBody(requestID, hostID string) []byte
type InvalidPartError ¶ added in v1.5.0
InvalidPartError is returned when one or more specified parts cannot be found. Produces <UploadId>, <PartNumber>, and <ETag> fields in the XML response.
func GetInvalidPartErr ¶ added in v1.5.0
func GetInvalidPartErr(uploadId string, partNumber int32, etag string) InvalidPartError
func (InvalidPartError) HTMLBody ¶ added in v1.6.0
func (e InvalidPartError) HTMLBody(requestID, hostID string) []byte
func (InvalidPartError) Is ¶ added in v1.5.0
func (e InvalidPartError) Is(target error) bool
func (InvalidPartError) XMLBody ¶ added in v1.5.0
func (e InvalidPartError) XMLBody(requestID, hostID string) []byte
type InvalidPartNumberRangeError ¶ added in v1.5.0
type InvalidPartNumberRangeError struct {
APIError
ActualPartCount int32
PartNumberRequested int32
}
InvalidPartNumberRangeError is returned when the requested part number exceeds the number of parts available for the object. Produces <ActualPartCount> and <PartNumberRequested> fields in the XML response.
func GetInvalidPartNumberRangeErr ¶ added in v1.5.0
func GetInvalidPartNumberRangeErr(actualPartCount, partNumberRequested int32) InvalidPartNumberRangeError
func (InvalidPartNumberRangeError) HTMLBody ¶ added in v1.6.0
func (e InvalidPartNumberRangeError) HTMLBody(requestID, hostID string) []byte
func (InvalidPartNumberRangeError) Is ¶ added in v1.5.0
func (e InvalidPartNumberRangeError) Is(target error) bool
func (InvalidPartNumberRangeError) XMLBody ¶ added in v1.5.0
func (e InvalidPartNumberRangeError) XMLBody(requestID, hostID string) []byte
type InvalidRangeError ¶ added in v1.5.0
InvalidRangeError is returned when the requested byte range cannot be satisfied. Produces <RangeRequested> and <ActualObjectSize> fields in the XML response.
func GetInvalidRangeErr ¶ added in v1.5.0
func GetInvalidRangeErr(rangeRequested string, actualObjectSize int64) InvalidRangeError
func (InvalidRangeError) HTMLBody ¶ added in v1.6.0
func (e InvalidRangeError) HTMLBody(requestID, hostID string) []byte
func (InvalidRangeError) Is ¶ added in v1.5.0
func (e InvalidRangeError) Is(target error) bool
func (InvalidRangeError) XMLBody ¶ added in v1.5.0
func (e InvalidRangeError) XMLBody(requestID, hostID string) []byte
type InvalidTagError ¶ added in v1.5.0
InvalidTagError is returned when a tag key or value is invalid. Produces <TagKey> and optionally <TagValue> fields in the XML response.
func GetInvalidTagErr ¶ added in v1.5.0
func GetInvalidTagErr(code ErrorCode, tagKey, tagValue string) InvalidTagError
GetInvalidTagErr creates an InvalidTagError for the given error code, tag key, and optional tag value. code should be ErrInvalidTagKey or ErrInvalidTagValue.
func (InvalidTagError) HTMLBody ¶ added in v1.6.0
func (e InvalidTagError) HTMLBody(requestID, hostID string) []byte
func (InvalidTagError) Is ¶ added in v1.5.0
func (e InvalidTagError) Is(target error) bool
func (InvalidTagError) XMLBody ¶ added in v1.5.0
func (e InvalidTagError) XMLBody(requestID, hostID string) []byte
type KeyTooLongError ¶ added in v1.5.0
KeyTooLongError is returned when the object key exceeds the maximum allowed length. Produces <Size> and <MaxSizeAllowed> fields in the XML response.
func GetKeyTooLongErr ¶ added in v1.5.0
func GetKeyTooLongErr(size, maxSizeAllowed int64) KeyTooLongError
func (KeyTooLongError) HTMLBody ¶ added in v1.6.0
func (e KeyTooLongError) HTMLBody(requestID, hostID string) []byte
func (KeyTooLongError) Is ¶ added in v1.5.0
func (e KeyTooLongError) Is(target error) bool
func (KeyTooLongError) XMLBody ¶ added in v1.5.0
func (e KeyTooLongError) XMLBody(requestID, hostID string) []byte
type MalformedAuthError ¶ added in v1.5.0
MalformedAuthError is returned when a Signature V4 authorization header is malformed. Produces a <Region> field in the XML response when the expected gateway region is known.
func (MalformedAuthError) HTMLBody ¶ added in v1.6.0
func (e MalformedAuthError) HTMLBody(requestID, hostID string) []byte
func (MalformedAuthError) Is ¶ added in v1.5.0
func (e MalformedAuthError) Is(target error) bool
func (MalformedAuthError) XMLBody ¶ added in v1.5.0
func (e MalformedAuthError) XMLBody(requestID, hostID string) []byte
type MaxMessageLengthExceeded ¶ added in v1.6.0
MaxMessageLengthExceeded is returned when the request size exceeds the maximum limit Produces the <MaxMessageLengthBytes> field in the XML response.
func GetMaxMessageLengthExceeded ¶ added in v1.6.0
func GetMaxMessageLengthExceeded(maxMessageLengthBytes int64) MaxMessageLengthExceeded
func (MaxMessageLengthExceeded) HTMLBody ¶ added in v1.6.0
func (e MaxMessageLengthExceeded) HTMLBody(requestID, hostID string) []byte
func (MaxMessageLengthExceeded) Is ¶ added in v1.6.0
func (e MaxMessageLengthExceeded) Is(target error) bool
func (MaxMessageLengthExceeded) XMLBody ¶ added in v1.6.0
func (e MaxMessageLengthExceeded) XMLBody(requestID, hostID string) []byte
type MetadataTooLargeError ¶ added in v1.5.0
MetadataTooLargeError is returned when the request metadata headers exceed the allowed size. Produces <Size> and <MaxSizeAllowed> fields in the XML response.
func GetMetadataTooLargeErr ¶ added in v1.5.0
func GetMetadataTooLargeErr(size, maxSizeAllowed int) MetadataTooLargeError
func (MetadataTooLargeError) HTMLBody ¶ added in v1.6.0
func (e MetadataTooLargeError) HTMLBody(requestID, hostID string) []byte
func (MetadataTooLargeError) Is ¶ added in v1.5.0
func (e MetadataTooLargeError) Is(target error) bool
func (MetadataTooLargeError) XMLBody ¶ added in v1.5.0
func (e MetadataTooLargeError) XMLBody(requestID, hostID string) []byte
type MethodNotAllowedError ¶ added in v1.5.0
type MethodNotAllowedError struct {
APIError
Method string
ResourceType ResourceType
AllowedMethods []string
}
MethodNotAllowedError is returned when an HTTP method is not permitted on a resource. Produces <Method> and <ResourceType> fields in the XML response. AllowedMethods is used to populate the HTTP Allow: response header.
func GetMethodNotAllowedErr ¶ added in v1.5.0
func GetMethodNotAllowedErr(method string, resourceType ResourceType, allowed []string) MethodNotAllowedError
func (*MethodNotAllowedError) AllowedMethodsString ¶ added in v1.5.0
func (mna *MethodNotAllowedError) AllowedMethodsString() string
func (MethodNotAllowedError) HTMLBody ¶ added in v1.6.0
func (e MethodNotAllowedError) HTMLBody(requestID, hostID string) []byte
func (MethodNotAllowedError) Is ¶ added in v1.5.0
func (e MethodNotAllowedError) Is(target error) bool
func (MethodNotAllowedError) XMLBody ¶ added in v1.5.0
func (e MethodNotAllowedError) XMLBody(requestID, hostID string) []byte
type NmpAdditionalMessage ¶ added in v1.5.0
type NmpAdditionalMessage string
const ( NmpAdditionalMessageIfNoneMatch NmpAdditionalMessage = "We don\\'t accept the provided value of If-None-Match header for this API" NmpAdditionalMessageMultipleCondHeaders NmpAdditionalMessage = "Multiple conditional request headers present in the request" )
type NoSuchUploadError ¶ added in v1.5.0
NoSuchUploadError is returned when the specified multipart upload does not exist. Produces an <UploadId> field in the XML response.
func GetNoSuchUploadErr ¶ added in v1.5.0
func GetNoSuchUploadErr(uploadId string) NoSuchUploadError
func (NoSuchUploadError) HTMLBody ¶ added in v1.6.0
func (e NoSuchUploadError) HTMLBody(requestID, hostID string) []byte
func (NoSuchUploadError) Is ¶ added in v1.5.0
func (e NoSuchUploadError) Is(target error) bool
func (NoSuchUploadError) XMLBody ¶ added in v1.5.0
func (e NoSuchUploadError) XMLBody(requestID, hostID string) []byte
type NoSuchVersionError ¶ added in v1.5.0
NoSuchVersionError is returned when the specified version does not exist. Produces <Key> and <VersionId> fields in the XML response.
func GetNoSuchVersionErr ¶ added in v1.5.0
func GetNoSuchVersionErr(key, versionId string) NoSuchVersionError
func (NoSuchVersionError) HTMLBody ¶ added in v1.6.0
func (e NoSuchVersionError) HTMLBody(requestID, hostID string) []byte
func (NoSuchVersionError) Is ¶ added in v1.5.0
func (e NoSuchVersionError) Is(target error) bool
func (NoSuchVersionError) XMLBody ¶ added in v1.5.0
func (e NoSuchVersionError) XMLBody(requestID, hostID string) []byte
type NotImplementedError ¶ added in v1.5.0
type NotImplementedError struct {
APIError
Header string
AdditionalMessage NmpAdditionalMessage
}
NotImplementedError is returned when a header implies unsupported functionality. Produces <Header> and <additionalMessage> fields in the XML response.
func GetNotImplementedErr ¶ added in v1.5.0
func GetNotImplementedErr(header string, additionalMessage NmpAdditionalMessage) NotImplementedError
func (NotImplementedError) HTMLBody ¶ added in v1.6.0
func (e NotImplementedError) HTMLBody(requestID, hostID string) []byte
func (NotImplementedError) Is ¶ added in v1.5.0
func (e NotImplementedError) Is(target error) bool
func (NotImplementedError) XMLBody ¶ added in v1.5.0
func (e NotImplementedError) XMLBody(requestID, hostID string) []byte
type PreconditionFailedError ¶ added in v1.5.0
PreconditionFailedError is returned when a conditional request precondition is not met. Produces a <Condition> field in the XML response.
func GetPreconditionFailedErr ¶ added in v1.5.0
func GetPreconditionFailedErr(condition Condition) PreconditionFailedError
func (PreconditionFailedError) HTMLBody ¶ added in v1.6.0
func (e PreconditionFailedError) HTMLBody(requestID, hostID string) []byte
func (PreconditionFailedError) Is ¶ added in v1.5.0
func (e PreconditionFailedError) Is(target error) bool
func (PreconditionFailedError) XMLBody ¶ added in v1.5.0
func (e PreconditionFailedError) XMLBody(requestID, hostID string) []byte
type RequestHeaderSectionTooLargeError ¶ added in v1.6.0
RequestHeaderSectionTooLargeError is returned when the full HTTP request header section exceeds the server read buffer. Produces a <MaxSizeAllowed> field in the XML response.
func GetRequestHeaderSectionTooLargeErr ¶ added in v1.6.0
func GetRequestHeaderSectionTooLargeErr(maxSizeAllowed int) RequestHeaderSectionTooLargeError
func (RequestHeaderSectionTooLargeError) HTMLBody ¶ added in v1.6.0
func (e RequestHeaderSectionTooLargeError) HTMLBody(requestID, hostID string) []byte
func (RequestHeaderSectionTooLargeError) Is ¶ added in v1.6.0
func (e RequestHeaderSectionTooLargeError) Is(target error) bool
func (RequestHeaderSectionTooLargeError) XMLBody ¶ added in v1.6.0
func (e RequestHeaderSectionTooLargeError) XMLBody(requestID, hostID string) []byte
type RequestTimeTooSkewedError ¶ added in v1.5.0
type RequestTimeTooSkewedError struct {
APIError
RequestTime string
ServerTime string
MaxAllowedSkewMilliseconds int
}
RequestTimeTooSkewedError is returned when the request timestamp is too far from server time. Produces <RequestTime>, <ServerTime>, and <MaxAllowedSkewMilliseconds> fields.
func GetRequestTimeTooSkewedErr ¶ added in v1.5.0
func GetRequestTimeTooSkewedErr(requestTime, serverTime string, maxAllowedMilliseconds int) RequestTimeTooSkewedError
func (RequestTimeTooSkewedError) HTMLBody ¶ added in v1.6.0
func (e RequestTimeTooSkewedError) HTMLBody(requestID, hostID string) []byte
func (RequestTimeTooSkewedError) Is ¶ added in v1.5.0
func (e RequestTimeTooSkewedError) Is(target error) bool
func (RequestTimeTooSkewedError) XMLBody ¶ added in v1.5.0
func (e RequestTimeTooSkewedError) XMLBody(requestID, hostID string) []byte
type ResourceType ¶ added in v1.5.0
type ResourceType string
const ( ResourceTypeBucket ResourceType = "BUCKET" ResourceTypeObject ResourceType = "OBJECT" ResourceTypeService ResourceType = "SERVICE" ResourceTypeBucketPolicy ResourceType = "BUCKETPOLICY" ResourceTypeUpload ResourceType = "UPLOAD" )
type S3Error ¶ added in v1.5.0
type S3Error interface {
error
StatusCode() int
BaseError() APIError
XMLBody(requestID, hostID string) []byte
HTMLBody(requestID, hostID string) []byte
}
S3Error is the interface implemented by all S3 error types. It allows centralized error handling while supporting per-error-type XML fields.
type SignatureDoesNotMatchError ¶ added in v1.5.0
type SignatureDoesNotMatchError struct {
APIError
AWSAccessKeyId string
StringToSign string
SignatureProvided string
StringToSignBytes string
CanonicalRequest string
CanonicalRequestBytes string
}
SignatureDoesNotMatchError is returned when request signature verification fails. Produces diagnostic fields to help callers debug the mismatch.
func GetSignatureDoesNotMatchErr ¶ added in v1.5.0
func GetSignatureDoesNotMatchErr(accessKeyId, stringToSign, signatureProvided, stringToSignBytes, canonicalRequest, canonicalRequestBytes string) SignatureDoesNotMatchError
func (SignatureDoesNotMatchError) HTMLBody ¶ added in v1.6.0
func (e SignatureDoesNotMatchError) HTMLBody(requestID, hostID string) []byte
func (SignatureDoesNotMatchError) Is ¶ added in v1.5.0
func (e SignatureDoesNotMatchError) Is(target error) bool
func (SignatureDoesNotMatchError) XMLBody ¶ added in v1.5.0
func (e SignatureDoesNotMatchError) XMLBody(requestID, hostID string) []byte
Source Files
¶
- access-forbidden-error.go
- bad-digest-error.go
- bucket-error.go
- content-sha256-mismatch-error.go
- entity-too-large-error.go
- entity-too-small-error.go
- expired-presigned-url-error.go
- headers-not-signed-error.go
- invalid-access-key-id-error.go
- invalid-argument.go
- invalid-chunk-size-error.go
- invalid-digest-error.go
- invalid-location-constraint-error.go
- invalid-part-error.go
- invalid-part-number-range-error.go
- invalid-range-error.go
- invalid-tag-error.go
- key-too-long-error.go
- max-message-length-exceeded-error.go
- metadata-too-large-error.go
- method-not-allowed-error.go
- no-such-upload-error.go
- no-such-version-error.go
- not-implemented-error.go
- post-object.go
- precondition-failed-error.go
- presigned-urls.go
- request-header-section-too-large-error.go
- request-time-too-skewed-error.go
- s3err.go
- signature-does-not-match-error.go
- sigv4.go