s3error

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNoSuchKey

func IsNoSuchKey(err error) bool

func IsNotFound

func IsNotFound(err error) bool

func IsS3Error

func IsS3Error(err error, code ErrorCode) bool

func WriteError

func WriteError(r *http.Request, w http.ResponseWriter, err error)

Types

type Error added in v0.0.2

type Error struct {
	Code      string
	Message   string
	Resource  string
	RequestID string
}

type ErrorCode

type ErrorCode string
var (
	ErrorCodeAccessDenied                                   ErrorCode = "AccessDenied"
	ErrorCodeAccountProblem                                 ErrorCode = "AccountProblem"
	ErrorCodeAllAccessDisabled                              ErrorCode = "AllAccessDisabled"
	ErrorCodeAmbiguousGrantByEmailAddress                   ErrorCode = "AmbiguousGrantByEmailAddress"
	ErrorCodeAuthorizationHeaderMalformed                   ErrorCode = "AuthorizationHeaderMalformed"
	ErrorCodeBadDigest                                      ErrorCode = "BadDigest"
	ErrorCodeBucketAlreadyExists                            ErrorCode = "BucketAlreadyExists"
	ErrorCodeBucketAlreadyOwnedByYou                        ErrorCode = "BucketAlreadyOwnedByYou"
	ErrorCodeBucketNotEmpty                                 ErrorCode = "BucketNotEmpty"
	ErrorCodeCredentialsNotSupported                        ErrorCode = "CredentialsNotSupported"
	ErrorCodeCrossLocationLoggingProhibited                 ErrorCode = "CrossLocationLoggingProhibited"
	ErrorCodeEntityTooSmall                                 ErrorCode = "EntityTooSmall"
	ErrorCodeEntityTooLarge                                 ErrorCode = "EntityTooLarge"
	ErrorCodeExpiredToken                                   ErrorCode = "ExpiredToken"
	ErrorCodeIllegalVersioningConfigurationException        ErrorCode = "IllegalVersioningConfigurationException"
	ErrorCodeIncompleteBody                                 ErrorCode = "IncompleteBody"
	ErrorCodeIncorrectNumberOfFilesInPostRequest            ErrorCode = "IncorrectNumberOfFilesInPostRequest"
	ErrorCodeInlineDataTooLarge                             ErrorCode = "InlineDataTooLarge"
	ErrorCodeInternalError                                  ErrorCode = "InternalError"
	ErrorCodeInvalidAccessKeyID                             ErrorCode = "InvalidAccessKeyId"
	ErrorCodeInvalidAddressingHeader                        ErrorCode = "InvalidAddressingHeader"
	ErrorCodeInvalidArgument                                ErrorCode = "InvalidArgument"
	ErrorCodeInvalidBucketName                              ErrorCode = "InvalidBucketName"
	ErrorCodeInvalidBucketState                             ErrorCode = "InvalidBucketState"
	ErrorCodeInvalidDigest                                  ErrorCode = "InvalidDigest"
	ErrorCodeInvalidEncryptionAlgorithmError                ErrorCode = "InvalidEncryptionAlgorithmError"
	ErrorCodeInvalidLocationConstraint                      ErrorCode = "InvalidLocationConstraint"
	ErrorCodeInvalidObjectState                             ErrorCode = "InvalidObjectState"
	ErrorCodeInvalidPart                                    ErrorCode = "InvalidPart"
	ErrorCodeInvalidPartOrder                               ErrorCode = "InvalidPartOrder"
	ErrorCodeInvalidPayer                                   ErrorCode = "InvalidPayer"
	ErrorCodeInvalidPolicyDocument                          ErrorCode = "InvalidPolicyDocument"
	ErrorCodeInvalidRange                                   ErrorCode = "InvalidRange"
	ErrorCodeInvalidSecurity                                ErrorCode = "InvalidSecurity"
	ErrorCodeInvalidSOAPRequest                             ErrorCode = "InvalidSOAPRequest"
	ErrorCodeInvalidStorageClass                            ErrorCode = "InvalidStorageClass"
	ErrorCodeInvalidTargetBucketForLogging                  ErrorCode = "InvalidTargetBucketForLogging"
	ErrorCodeInvalidToken                                   ErrorCode = "InvalidToken"
	ErrorCodeInvalidURI                                     ErrorCode = "InvalidURI"
	ErrorCodeKeyTooLongError                                ErrorCode = "KeyTooLongError"
	ErrorCodeMalformedACLError                              ErrorCode = "MalformedACLError"
	ErrorCodeMalformedPOSTRequest                           ErrorCode = "MalformedPOSTRequest"
	ErrorCodeMalformedXML                                   ErrorCode = "MalformedXML"
	ErrorCodeMaxMessageLengthExceeded                       ErrorCode = "MaxMessageLengthExceeded"
	ErrorCodeMaxPostPreDataLengthExceededError              ErrorCode = "MaxPostPreDataLengthExceededError"
	ErrorCodeMetadataTooLarge                               ErrorCode = "MetadataTooLarge"
	ErrorCodeMethodNotAllowed                               ErrorCode = "MethodNotAllowed"
	ErrorCodeMissingAttachment                              ErrorCode = "MissingAttachment"
	ErrorCodeMissingContentLength                           ErrorCode = "MissingContentLength"
	ErrorCodeMissingRequestBodyError                        ErrorCode = "MissingRequestBodyError"
	ErrorCodeMissingSecurityElement                         ErrorCode = "MissingSecurityElement"
	ErrorCodeMissingSecurityHeader                          ErrorCode = "MissingSecurityHeader"
	ErrorCodeNoLoggingStatusForKey                          ErrorCode = "NoLoggingStatusForKey"
	ErrorCodeNoSuchBucket                                   ErrorCode = "NoSuchBucket"
	ErrorCodeNoSuchBucketPolicy                             ErrorCode = "NoSuchBucketPolicy"
	ErrorCodeNoSuchKey                                      ErrorCode = "NoSuchKey"
	ErrorCodeNoSuchLifecycleConfiguration                   ErrorCode = "NoSuchLifecycleConfiguration"
	ErrorCodeNoSuchUpload                                   ErrorCode = "NoSuchUpload"
	ErrorCodeNoSuchVersion                                  ErrorCode = "NoSuchVersion"
	ErrorCodeNotImplemented                                 ErrorCode = "NotImplemented"
	ErrorCodeNotSignedUp                                    ErrorCode = "NotSignedUp"
	ErrorCodeOperationAborted                               ErrorCode = "OperationAborted"
	ErrorCodePermanentRedirect                              ErrorCode = "PermanentRedirect"
	ErrorCodePreconditionFailed                             ErrorCode = "PreconditionFailed"
	ErrorCodeRedirect                                       ErrorCode = "Redirect"
	ErrorCodeRestoreAlreadyInProgress                       ErrorCode = "RestoreAlreadyInProgress"
	ErrorCodeRequestIsNotMultiPartContent                   ErrorCode = "RequestIsNotMultiPartContent"
	ErrorCodeRequestTimeout                                 ErrorCode = "RequestTimeout"
	ErrorCodeRequestTimeTooSkewed                           ErrorCode = "RequestTimeTooSkewed"
	ErrorCodeRequestTorrentOfBucketError                    ErrorCode = "RequestTorrentOfBucketError"
	ErrorCodeServerSideEncryptionConfigurationNotFoundError ErrorCode = "ServerSideEncryptionConfigurationNotFoundError"
	ErrorCodeServiceUnavailable                             ErrorCode = "ServiceUnavailable"
	ErrorCodeSignatureDoesNotMatch                          ErrorCode = "SignatureDoesNotMatch"
	ErrorCodeSlowDown                                       ErrorCode = "SlowDown"
	ErrorCodeTemporaryRedirect                              ErrorCode = "TemporaryRedirect"
	ErrorCodeTokenRefreshRequired                           ErrorCode = "TokenRefreshRequired"
	ErrorCodeTooManyBuckets                                 ErrorCode = "TooManyBuckets"
	ErrorCodeUnexpectedContent                              ErrorCode = "UnexpectedContent"
	ErrorCodeUnresolvableGrantByEmailAddress                ErrorCode = "UnresolvableGrantByEmailAddress"
	ErrorCodeUserKeyMustBeSpecified                         ErrorCode = "UserKeyMustBeSpecified"
	ErrorCodeObjectAlreadyExists                            ErrorCode = "ObjectAlreadyExists"
)

type S3Error

type S3Error struct {
	OriginError error
	Code        ErrorCode
}

func (S3Error) Detail

func (s S3Error) Detail() string

func (S3Error) Error

func (s S3Error) Error() string

func (*S3Error) GetCode

func (s *S3Error) GetCode() ErrorCode

func (S3Error) HTTPStatusCode

func (s S3Error) HTTPStatusCode() int

Jump to

Keyboard shortcuts

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