error

package
v0.0.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorCodeResponse = map[ApiErrorCode]ApiErrorStruct{}/* 161 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 ApiError

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

type ApiErrorCode

type ApiErrorCode int

APIErrorCode type of error status.

const (
	ErrAccessDenied ApiErrorCode = iota
	ErrBadDigest
	ErrBucketAlreadyExists
	ErrEmptyEntity
	ErrEntityTooLarge
	ErrIncompleteBody
	ErrInternalError
	ErrInvalidAccessKeyID
	ErrSuspendedAccessKeyID
	ErrForbiddenAccessKeyID
	ErrInvalidBucketName
	ErrInvalidObjectName
	ErrInvalidDigest
	ErrInvalidRange
	ErrInvalidEncodingType
	ErrInvalidContinuationToken
	ErrInvalidMaxKeys
	ErrInvalidMaxUploads
	ErrInvalidMaxParts
	ErrInvalidPartNumberMarker
	ErrInvalidRequestBody
	ErrInvalidCopySource
	ErrInvalidCopySourceStorageClass
	ErrInvalidCopyDest
	ErrInvalidCopyRequest
	ErrInvalidCopyRequestWithSameObject
	ErrInvalidRenameSourceKey
	ErrInvalidRenameTarget
	ErrNotSupportBucketEnabledVersion
	ErrInvalidPrecondition
	ErrInvalidPolicyDocument
	ErrInvalidCorsDocument
	ErrInvalidVersioning
	ErrMalformedXML
	ErrMissingContentLength
	ErrMissingContentMD5
	ErrMissingRequestBodyError
	ErrNoSuchBucket
	ErrNoSuchBucketPolicy
	ErrNoSuchKey
	ErrForbiddenOverwriteKey
	ErrNoSuchUpload
	ErrNoSuchVersion
	ErrNotImplemented
	ErrPreconditionFailed
	ErrRequestTimeTooSkewed
	ErrSignatureDoesNotMatch
	ErrMethodNotAllowed
	ErrInvalidPart
	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
	ErrMetadataHeader
	ErrMaintenance
	// Add new error codes here.
	ErrCallBackFailed
	ErrValidCallBackInfo

	// 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
	ErrInvalidBucketLogging
	ErrInvalidTargetBucket
	ErrInvalidLcTagKey
	ErrInvalidLcTagValue
	ErrDuplicateLcTagKey
	ErrInvalidLcTagIsNotEmpty
	ErrLcDateNotMidnight
	ErrInvalidLcDate
	ErrInvalidLcDays
	ErrInvalidLcUsingDateAndDays
	ErrInvalidLcFilter
	ErrInvalidLcRulesNumbers
	ErrLcMissingNoncurrentDays
	ErrLcMissingStorageClass
	ErrInvalidLcStorageClass
	ErrLcMissingDaysAfterInitiation
	ErrInvalidLcRuleID
	ErrInvalidLcRuleStatus
	ErrLcMissingAction

	ErrNoSuchBucketLc
	ErrInvalidStorageClass
	ErrInvalidWebsiteConfiguration
	ErrMalformedWebsiteConfiguration
	ErrInvalidWebsiteRedirectProtocol
	ErrExceededWebsiteRoutingRulesLimit
	ErrSecondLevelDomainForbidden
	ErrMissingRoutingRuleInWebsiteRules
	ErrMissingRedirectInWebsiteRoutingRule
	ErrMissingRedirectElementInWebsiteRoutingRule
	ErrDuplicateKeyReplaceTagInWebsiteRoutingRule
	ErrInvalidHttpRedirectCodeInWebsiteRoutingRule
	ErrIndexDocumentNotAllowed
	ErrInvalidIndexDocumentSuffix
	ErrInvalidErrorDocumentKey
	ErrMalformedMetadataConfiguration
	ErrMalformedEncryptionConfiguration
	ErrMissingRuleInEncryption
	ErrExceededEncryptionRulesLimit
	ErrMissingEncryptionByDefaultInEncryptionRule
	ErrMissingSSEAlgorithmOrKMSMasterKeyIDInEncryptionRule
	ErrInvalidStatus
	ErrInvalidRestoreInfo
	ErrInvalidRestoreDate
	ErrCreateRestoreObject
	ErrInvalidGlacierObject
	ErrInvalidStorageClassConvert
	ErrInvalidCallbackParameter
	ErrInvalidCallbackBodyParameter
	ErrGetCallbackMagicParameter
	ErrInvalidCallbackMagicImageType
	ErrObjectMovedPermanently
	ErrObjectMutexProtected
	ErrRequestLimitExceeded
)

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

func (ApiErrorCode) AwsErrorCode

func (e ApiErrorCode) AwsErrorCode() string

func (ApiErrorCode) Description

func (e ApiErrorCode) Description() string

func (ApiErrorCode) Error

func (e ApiErrorCode) Error() string

func (ApiErrorCode) HttpStatusCode

func (e ApiErrorCode) HttpStatusCode() int

type ApiErrorStruct

type ApiErrorStruct 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