s3error

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 1 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorCodeResponse = map[S3ErrorCode]S3ErrorStruct{}/* 113 elements not displayed */

error code to APIError structure, these fields carry respective descriptions for all the error responses.

Functions

This section is empty.

Types

type S3Error

type S3Error interface {
	error
	AwsErrorCode() string
	Description() string
	HttpStatusCode() int
}

type S3ErrorCode

type S3ErrorCode int

APIErrorCode type of error status.

const (
	ErrNoErr S3ErrorCode = iota
	ErrAccessDenied
	ErrBadDigest
	ErrBucketAlreadyExists
	ErrEmptyEntity
	ErrEntityTooLarge
	ErrIncompleteBody
	ErrInternalError
	ErrInvalidAccessKeyID
	ErrInvalidBucketName
	ErrInvalidObjectName
	ErrInvalidDigest
	ErrInvalidRange
	ErrInvalidEncodingType
	ErrInvalidContinuationToken
	ErrInvalidMaxKeys
	ErrInvalidMaxUploads
	ErrInvalidMaxParts
	ErrInvalidPartNumberMarker
	ErrInvalidRequestBody
	ErrInvalidCopySource
	ErrInvalidCopySourceStorageClass
	ErrInvalidCopyDest
	ErrInvalidPrecondition
	ErrInvalidPolicyDocument
	ErrInvalidCorsDocument
	ErrInvalidVersioning
	ErrMalformedXML
	ErrMissingContentLength
	ErrMissingContentMD5
	ErrMissingRequestBodyError
	ErrNoSuchBucket
	ErrNoSuchBucketPolicy
	ErrNoSuchKey
	ErrNoSuchUpload
	ErrNoSuchVersion
	ErrNotImplemented
	ErrPreconditionFailed
	ErrRequestTimeTooSkewed
	ErrSignatureDoesNotMatch
	ErrMethodNotAllowed
	ErrInvalidPart
	EntityTooSmall
	ErrInvalidPartOrder
	ErrAuthorizationHeaderMalformed
	ErrMalformedPOSTRequest
	ErrSignatureVersionNotSupported
	ErrBucketNotEmpty
	ErrBucketAccessForbidden
	ErrMalformedPolicy
	ErrMissingFields
	ErrMissingCredTag
	ErrCredMalformed
	ErrInvalidRegion
	ErrInvalidService
	ErrInvalidRequestVersion
	ErrMissingSignTag
	ErrMissingSignHeadersTag
	ErrMissingRequiredSignedHeader
	ErrSignedHeadersNotSorted
	ErrPolicyAlreadyExpired
	ErrPolicyViolation
	ErrMalformedDate
	ErrMalformedExpires
	ErrAuthHeaderEmpty
	ErrExpiredPresignRequest
	ErrMissingDateHeader
	ErrInvalidQuerySignatureAlgo
	ErrInvalidQueryParams
	ErrBucketAlreadyOwnedByYou
	ErrInvalidCannedAcl
	ErrInvalidSseHeader
	ErrTooManyBuckets
	ErrInvalidPosition
	ErrObjectNotAppendable
	ErrPositionNotEqualToLength

	// SSE-S3 related API errors
	ErrInvalidEncryptionMethod

	// Server-Side-Encryption (with Customer provided key) related API errors.
	ErrInsecureSSECustomerRequest
	ErrSSEMultipartEncrypted
	ErrSSEEncryptedObject
	ErrInvalidEncryptionParameters
	ErrInvalidSSECustomerAlgorithm
	ErrInvalidSSECustomerKey
	ErrMissingSSECustomerKey
	ErrMissingSSECustomerKeyMD5
	ErrSSECustomerKeyMD5Mismatch
	ErrInvalidSSECustomerParameters
	ErrIncompatibleEncryptionMethod
	ErrKMSNotConfigured
	ErrKMSAuthFailure

	// S3 extended errors.
	ErrContentSHA256Mismatch

	// Add new extended error codes here.
	ContentNotModified // actually not an error
	ErrInvalidHeader   // supplementary error for golang http lib
	ErrNoSuchBucketCors
	ErrPolicyMissingFields
	ErrInvalidAcl
	ErrUnsupportedAcl
	ErrNonUTF8Encode
	ErrInvalidLc
	ErrNoSuchBucketLc
	ErrInvalidStorageClass
	ErrPutToBackendFailed
	ErrGetFromBackendFailed
	ErrDeleteFromBackendFailed
	ErrBackendInitMultipartFailed
	ErrBackendCompleteMultipartFailed
	ErrBackendAbortMultipartFailed
	ErrGetBackendFailed
	ErrUnmarshalFailed
	ErrGetBucketFailed
	ErrDBError
	ErrRestoreObjectFailed
	ErrRestoreInProgress
)

Error codes, non exhaustive list - http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html

func (S3ErrorCode) AwsErrorCode

func (e S3ErrorCode) AwsErrorCode() string

func (S3ErrorCode) Description

func (e S3ErrorCode) Description() string

func (S3ErrorCode) Error

func (e S3ErrorCode) Error() string

func (S3ErrorCode) HttpStatusCode

func (e S3ErrorCode) HttpStatusCode() int

type S3ErrorStruct

type S3ErrorStruct struct {
	AwsErrorCode   string
	Description    string
	HttpStatusCode int
}

Jump to

Keyboard shortcuts

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