2015-09-18 23:48:01 +02:00
|
|
|
/*
|
2019-04-09 20:39:42 +02:00
|
|
|
* MinIO Cloud Storage, (C) 2015, 2016 MinIO, Inc.
|
2015-09-18 23:48:01 +02:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2016-08-19 01:23:42 +02:00
|
|
|
package cmd
|
2015-09-18 23:48:01 +02:00
|
|
|
|
2018-05-09 04:04:36 +02:00
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
)
|
2015-09-18 23:48:01 +02:00
|
|
|
|
2015-10-18 04:17:33 +02:00
|
|
|
// errInvalidArgument means that input argument is invalid.
|
|
|
|
var errInvalidArgument = errors.New("Invalid arguments specified")
|
2016-03-13 01:08:15 +01:00
|
|
|
|
2018-06-07 03:10:51 +02:00
|
|
|
// errMethodNotAllowed means that method is not allowed.
|
|
|
|
var errMethodNotAllowed = errors.New("Method not allowed")
|
|
|
|
|
2016-03-13 01:08:15 +01:00
|
|
|
// errSignatureMismatch means signature did not match.
|
|
|
|
var errSignatureMismatch = errors.New("Signature does not match")
|
2016-03-31 15:57:29 +02:00
|
|
|
|
2016-07-28 21:02:22 +02:00
|
|
|
// used when we deal with data larger than expected
|
2016-10-10 08:03:10 +02:00
|
|
|
var errSizeUnexpected = errors.New("Data size larger than expected")
|
2016-10-22 18:05:01 +02:00
|
|
|
|
2017-02-02 19:45:00 +01:00
|
|
|
// used when we deal with data with unknown size
|
|
|
|
var errSizeUnspecified = errors.New("Data size is unspecified")
|
|
|
|
|
2016-10-22 18:05:01 +02:00
|
|
|
// When upload object size is greater than 5G in a single PUT/POST operation.
|
|
|
|
var errDataTooLarge = errors.New("Object size larger than allowed limit")
|
2016-10-25 08:47:03 +02:00
|
|
|
|
|
|
|
// When upload object size is less than what was expected.
|
|
|
|
var errDataTooSmall = errors.New("Object size smaller than expected")
|
2016-11-15 22:39:02 +01:00
|
|
|
|
|
|
|
// errServerNotInitialized - server not initialized.
|
2016-11-16 03:14:23 +01:00
|
|
|
var errServerNotInitialized = errors.New("Server not initialized, please try again")
|
2016-11-15 22:39:02 +01:00
|
|
|
|
2018-02-07 00:07:17 +01:00
|
|
|
// errRPCAPIVersionUnsupported - unsupported rpc API version.
|
|
|
|
var errRPCAPIVersionUnsupported = errors.New("Unsupported rpc API version")
|
2016-11-15 22:39:02 +01:00
|
|
|
|
|
|
|
// errServerTimeMismatch - server times are too far apart.
|
2016-11-16 03:14:23 +01:00
|
|
|
var errServerTimeMismatch = errors.New("Server times are too far apart")
|
2017-03-03 12:01:42 +01:00
|
|
|
|
2019-04-09 20:39:42 +02:00
|
|
|
// errInvalidBucketName - bucket name is reserved for MinIO, usually
|
2017-09-01 21:16:54 +02:00
|
|
|
// returned for 'minio', '.minio.sys', buckets with capital letters.
|
|
|
|
var errInvalidBucketName = errors.New("The specified bucket is not valid")
|
2017-03-04 01:32:04 +01:00
|
|
|
|
|
|
|
// errInvalidRange - returned when given range value is not valid.
|
|
|
|
var errInvalidRange = errors.New("Invalid range")
|
|
|
|
|
|
|
|
// errInvalidRangeSource - returned when given range value exceeds
|
|
|
|
// the source object size.
|
|
|
|
var errInvalidRangeSource = errors.New("Range specified exceeds source object size")
|
2018-04-04 06:58:48 +02:00
|
|
|
|
|
|
|
// error returned by disks which are to be initialized are waiting for the
|
|
|
|
// first server to initialize them in distributed set to initialize them.
|
|
|
|
var errNotFirstDisk = errors.New("Not first disk")
|
2018-04-13 00:43:38 +02:00
|
|
|
|
|
|
|
// error returned by first disk waiting to initialize other servers.
|
|
|
|
var errFirstDiskWait = errors.New("Waiting on other disks")
|
2018-05-01 19:36:37 +02:00
|
|
|
|
|
|
|
// error returned when a bucket already exists
|
|
|
|
var errBucketAlreadyExists = errors.New("Your previous request to create the named bucket succeeded and you already own it")
|
2018-09-28 05:36:17 +02:00
|
|
|
|
|
|
|
// error returned for a negative actual size.
|
|
|
|
var errInvalidDecompressedSize = errors.New("Invalid Decompressed Size")
|
2018-10-16 21:48:19 +02:00
|
|
|
|
|
|
|
// error returned in IAM subsystem when user doesn't exist.
|
|
|
|
var errNoSuchUser = errors.New("Specified user does not exist")
|
|
|
|
|
2019-08-02 23:25:00 +02:00
|
|
|
// error returned in IAM subsystem when groups doesn't exist.
|
|
|
|
var errNoSuchGroup = errors.New("Specified group does not exist")
|
|
|
|
|
|
|
|
// error returned in IAM subsystem when a non-empty group needs to be
|
|
|
|
// deleted.
|
|
|
|
var errGroupNotEmpty = errors.New("Specified group is not empty - cannot remove it")
|
|
|
|
|
2018-10-16 21:48:19 +02:00
|
|
|
// error returned in IAM subsystem when policy doesn't exist.
|
|
|
|
var errNoSuchPolicy = errors.New("Specified canned policy does not exist")
|
2018-10-18 01:23:09 +02:00
|
|
|
|
2019-09-10 01:12:29 +02:00
|
|
|
// error returned in IAM subsystem when an external users systems is configured.
|
|
|
|
var errIAMActionNotAllowed = errors.New("Specified IAM action is not allowed under the current configuration")
|
|
|
|
|
2018-10-18 01:23:09 +02:00
|
|
|
// error returned when access is denied.
|
|
|
|
var errAccessDenied = errors.New("Do not have enough permissions to access this resource")
|