minio/typed-errors.go

73 lines
3.4 KiB
Go
Raw Normal View History

/*
* Minio Cloud Storage, (C) 2015 Minio, Inc.
*
* 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.
*/
package main
import "errors"
// errInvalidCredentials
var errInvalidCredentials = errors.New("Invalid credentials provided")
// errUnAuthorizedRequest - un authorized request.
var errUnAuthorizedRequest = errors.New("Unauthorized request")
2015-10-21 20:02:40 -04:00
// errSysLogNotSupported - this message is only meaningful on windows
var errSysLogNotSupported = errors.New("Syslog logger not supported on windows")
2015-10-17 22:17:33 -04:00
// errInvalidArgument means that input argument is invalid.
var errInvalidArgument = errors.New("Invalid arguments specified")
2015-10-17 18:03:46 -04:00
2015-10-17 22:17:33 -04:00
// errMissingAuthHeader means that Authorization header has missing value or it is empty.
var errMissingAuthHeaderValue = errors.New("Missing auth header value")
2015-10-17 22:17:33 -04:00
// errInvalidAuthHeaderValue means that Authorization header is available but is malformed and not in
2015-10-02 02:51:17 -04:00
// accordance with signature v4.
var errInvalidAuthHeaderValue = errors.New("Invalid auth header value")
// errInvalidAuthHeaderPrefix means that Authorization header
2015-10-02 02:51:17 -04:00
// has a wrong prefix only supported value should be "AWS4-HMAC-SHA256".
var errInvalidAuthHeaderPrefix = errors.New("Invalid auth header prefix")
2015-10-17 22:17:33 -04:00
// errMissingFieldsAuthHeader means that Authorization header is available but has some missing fields.
var errMissingFieldsAuthHeader = errors.New("Missing fields in auth header")
2015-10-17 22:17:33 -04:00
// errMissingFieldsCredentialTag means that Authorization header credentials tag has some missing fields.
var errMissingFieldsCredentialTag = errors.New("Missing fields in crendential tag")
2015-10-17 22:17:33 -04:00
// errMissingFieldsSignedHeadersTag means that Authorization header signed headers tag has some missing fields.
var errMissingFieldsSignedHeadersTag = errors.New("Missing fields in signed headers tag")
2015-10-17 22:17:33 -04:00
// errMissingFieldsSignatureTag means that Authorization header signature tag has missing fields.
var errMissingFieldsSignatureTag = errors.New("Missing fields in signature tag")
2015-10-17 22:17:33 -04:00
// errCredentialTagMalformed means that Authorization header credential tag is malformed.
var errCredentialTagMalformed = errors.New("Invalid credential tag malformed")
2015-10-17 22:17:33 -04:00
// errInvalidRegion means that the region element from credential tag in Authorization header is invalid.
var errInvalidRegion = errors.New("Invalid region")
2015-10-17 22:17:33 -04:00
// errAccessKeyIDInvalid means that the accessKeyID element from credential tag in Authorization header is invalid.
var errAccessKeyIDInvalid = errors.New("AccessKeyID invalid")
2015-10-02 02:51:17 -04:00
// errUnsupportedAlgorithm means that the provided X-Amz-Algorithm is unsupported.
var errUnsupportedAlgorithm = errors.New("Unsupported Algorithm")
2015-10-17 22:17:33 -04:00
// errPolicyAlreadyExpired means that the client request carries an post policy header which is already expired.
2015-10-02 02:51:17 -04:00
var errPolicyAlreadyExpired = errors.New("Policy already expired")
// errPolicyMissingFields means that form values and policy header have some fields missing.
var errPolicyMissingFields = errors.New("Some fields are missing or do not match in policy")