Adrien Delorme 0fa60c68fb
Drop the iso_checksum_type & iso_checksum_url fields (#8437)
* Drop the iso_checksum_type & iso_checksum_url fields

In favor of simply using iso_checksum that will know what to do.

* fix after master merge

* Update builder_test.go

* Update builder_test.go

* Update builder_test.go

* Update builder_test.go

* Update builder_test.go

* remove checksum lowercasing tests

* Update builder_test.go

* Update builder_test.go

* better docs

* Update builder_test.go

* even better docs

* Update config.go

* Update builder_test.go

* Update step_create_vmx_test.go

* make generate

* better docs

* fix imports

* up tests

* Update _ISOConfig-required.html.md

* Update builder_test.go

* don't use sha1.Sum("none") as a caching path

* Update builder_test.go

* better docs

* Update iso_config_test.go

remove ISOChecksumType/ISOChecksumURL references

* Update step_download_test.go

* add iso_checksum_url and iso_checksum_type fixers + tests

* add concrete examples of checksum values

* add examples of checksumming from local file

* update go-getter dep

* up deps

* use new go-getter version

* up ESX5Driver.VerifyChecksum: use go-getter's checksumming

* ISOConfig.Prepare: get checksum there in case we need it as a string in ESX5Driver.VerifyChecksum

* Update iso_config.go

* get go-getter from v2 branch

* Update driver_esx5.go

add more comments

* Update driver_esx5.go

* show better error message when the checksum is invalid

* Update builder_test.go

put in a valid checksum to fix tests, checksum is md5("packer")

* Update builder_test.go

test invalid and valid checksum

* more test updating

* fix default md5 string to be a valid md5

* TestChecksumFileNameMixedCaseBug: use 'file:' prefix for file checksumming

* Update iso_config_test.go

* Update iso_config_test.go

* Update builder_test.go

* Update builder_test.go

* Update builder_test.go

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update go.mod

* Update go.mod

* Update CHANGELOG.md
2020-05-28 11:02:09 +02:00

201 lines
9.0 KiB
Go

// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ecr
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeEmptyUploadException for service response error code
// "EmptyUploadException".
//
// The specified layer upload does not contain any layer parts.
ErrCodeEmptyUploadException = "EmptyUploadException"
// ErrCodeImageAlreadyExistsException for service response error code
// "ImageAlreadyExistsException".
//
// The specified image has already been pushed, and there were no changes to
// the manifest or image tag after the last push.
ErrCodeImageAlreadyExistsException = "ImageAlreadyExistsException"
// ErrCodeImageNotFoundException for service response error code
// "ImageNotFoundException".
//
// The image requested does not exist in the specified repository.
ErrCodeImageNotFoundException = "ImageNotFoundException"
// ErrCodeImageTagAlreadyExistsException for service response error code
// "ImageTagAlreadyExistsException".
//
// The specified image is tagged with a tag that already exists. The repository
// is configured for tag immutability.
ErrCodeImageTagAlreadyExistsException = "ImageTagAlreadyExistsException"
// ErrCodeInvalidLayerException for service response error code
// "InvalidLayerException".
//
// The layer digest calculation performed by Amazon ECR upon receipt of the
// image layer does not match the digest specified.
ErrCodeInvalidLayerException = "InvalidLayerException"
// ErrCodeInvalidLayerPartException for service response error code
// "InvalidLayerPartException".
//
// The layer part size is not valid, or the first byte specified is not consecutive
// to the last byte of a previous layer part upload.
ErrCodeInvalidLayerPartException = "InvalidLayerPartException"
// ErrCodeInvalidParameterException for service response error code
// "InvalidParameterException".
//
// The specified parameter is invalid. Review the available parameters for the
// API request.
ErrCodeInvalidParameterException = "InvalidParameterException"
// ErrCodeInvalidTagParameterException for service response error code
// "InvalidTagParameterException".
//
// An invalid parameter has been specified. Tag keys can have a maximum character
// length of 128 characters, and tag values can have a maximum length of 256
// characters.
ErrCodeInvalidTagParameterException = "InvalidTagParameterException"
// ErrCodeLayerAlreadyExistsException for service response error code
// "LayerAlreadyExistsException".
//
// The image layer already exists in the associated repository.
ErrCodeLayerAlreadyExistsException = "LayerAlreadyExistsException"
// ErrCodeLayerInaccessibleException for service response error code
// "LayerInaccessibleException".
//
// The specified layer is not available because it is not associated with an
// image. Unassociated image layers may be cleaned up at any time.
ErrCodeLayerInaccessibleException = "LayerInaccessibleException"
// ErrCodeLayerPartTooSmallException for service response error code
// "LayerPartTooSmallException".
//
// Layer parts must be at least 5 MiB in size.
ErrCodeLayerPartTooSmallException = "LayerPartTooSmallException"
// ErrCodeLayersNotFoundException for service response error code
// "LayersNotFoundException".
//
// The specified layers could not be found, or the specified layer is not valid
// for this repository.
ErrCodeLayersNotFoundException = "LayersNotFoundException"
// ErrCodeLifecyclePolicyNotFoundException for service response error code
// "LifecyclePolicyNotFoundException".
//
// The lifecycle policy could not be found, and no policy is set to the repository.
ErrCodeLifecyclePolicyNotFoundException = "LifecyclePolicyNotFoundException"
// ErrCodeLifecyclePolicyPreviewInProgressException for service response error code
// "LifecyclePolicyPreviewInProgressException".
//
// The previous lifecycle policy preview request has not completed. Please try
// again later.
ErrCodeLifecyclePolicyPreviewInProgressException = "LifecyclePolicyPreviewInProgressException"
// ErrCodeLifecyclePolicyPreviewNotFoundException for service response error code
// "LifecyclePolicyPreviewNotFoundException".
//
// There is no dry run for this repository.
ErrCodeLifecyclePolicyPreviewNotFoundException = "LifecyclePolicyPreviewNotFoundException"
// ErrCodeLimitExceededException for service response error code
// "LimitExceededException".
//
// The operation did not succeed because it would have exceeded a service limit
// for your account. For more information, see Amazon ECR Default Service Limits
// (https://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html)
// in the Amazon Elastic Container Registry User Guide.
ErrCodeLimitExceededException = "LimitExceededException"
// ErrCodeRepositoryAlreadyExistsException for service response error code
// "RepositoryAlreadyExistsException".
//
// The specified repository already exists in the specified registry.
ErrCodeRepositoryAlreadyExistsException = "RepositoryAlreadyExistsException"
// ErrCodeRepositoryNotEmptyException for service response error code
// "RepositoryNotEmptyException".
//
// The specified repository contains images. To delete a repository that contains
// images, you must force the deletion with the force parameter.
ErrCodeRepositoryNotEmptyException = "RepositoryNotEmptyException"
// ErrCodeRepositoryNotFoundException for service response error code
// "RepositoryNotFoundException".
//
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
ErrCodeRepositoryNotFoundException = "RepositoryNotFoundException"
// ErrCodeRepositoryPolicyNotFoundException for service response error code
// "RepositoryPolicyNotFoundException".
//
// The specified repository and registry combination does not have an associated
// repository policy.
ErrCodeRepositoryPolicyNotFoundException = "RepositoryPolicyNotFoundException"
// ErrCodeScanNotFoundException for service response error code
// "ScanNotFoundException".
//
// The specified image scan could not be found. Ensure that image scanning is
// enabled on the repository and try again.
ErrCodeScanNotFoundException = "ScanNotFoundException"
// ErrCodeServerException for service response error code
// "ServerException".
//
// These errors are usually caused by a server-side issue.
ErrCodeServerException = "ServerException"
// ErrCodeTooManyTagsException for service response error code
// "TooManyTagsException".
//
// The list of tags on the repository is over the limit. The maximum number
// of tags that can be applied to a repository is 50.
ErrCodeTooManyTagsException = "TooManyTagsException"
// ErrCodeUploadNotFoundException for service response error code
// "UploadNotFoundException".
//
// The upload could not be found, or the specified upload id is not valid for
// this repository.
ErrCodeUploadNotFoundException = "UploadNotFoundException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"EmptyUploadException": newErrorEmptyUploadException,
"ImageAlreadyExistsException": newErrorImageAlreadyExistsException,
"ImageNotFoundException": newErrorImageNotFoundException,
"ImageTagAlreadyExistsException": newErrorImageTagAlreadyExistsException,
"InvalidLayerException": newErrorInvalidLayerException,
"InvalidLayerPartException": newErrorInvalidLayerPartException,
"InvalidParameterException": newErrorInvalidParameterException,
"InvalidTagParameterException": newErrorInvalidTagParameterException,
"LayerAlreadyExistsException": newErrorLayerAlreadyExistsException,
"LayerInaccessibleException": newErrorLayerInaccessibleException,
"LayerPartTooSmallException": newErrorLayerPartTooSmallException,
"LayersNotFoundException": newErrorLayersNotFoundException,
"LifecyclePolicyNotFoundException": newErrorLifecyclePolicyNotFoundException,
"LifecyclePolicyPreviewInProgressException": newErrorLifecyclePolicyPreviewInProgressException,
"LifecyclePolicyPreviewNotFoundException": newErrorLifecyclePolicyPreviewNotFoundException,
"LimitExceededException": newErrorLimitExceededException,
"RepositoryAlreadyExistsException": newErrorRepositoryAlreadyExistsException,
"RepositoryNotEmptyException": newErrorRepositoryNotEmptyException,
"RepositoryNotFoundException": newErrorRepositoryNotFoundException,
"RepositoryPolicyNotFoundException": newErrorRepositoryPolicyNotFoundException,
"ScanNotFoundException": newErrorScanNotFoundException,
"ServerException": newErrorServerException,
"TooManyTagsException": newErrorTooManyTagsException,
"UploadNotFoundException": newErrorUploadNotFoundException,
}