| 
									
										
										
										
											2015-09-19 05:48:01 +08:00
										 |  |  | /* | 
					
						
							|  |  |  |  * 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. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-09-19 15:52:01 +08:00
										 |  |  | package main | 
					
						
							| 
									
										
										
										
											2015-09-19 05:48:01 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | import "errors" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-22 08:02:40 +08:00
										 |  |  | // errSysLogNotSupported - this message is only meaningful on windows
 | 
					
						
							|  |  |  | var errSysLogNotSupported = errors.New("Syslog logger not supported on windows") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-18 10:17:33 +08:00
										 |  |  | // errInvalidArgument means that input argument is invalid.
 | 
					
						
							|  |  |  | var errInvalidArgument = errors.New("Invalid arguments specified") | 
					
						
							| 
									
										
										
										
											2015-10-18 06:03:46 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-18 10:17:33 +08:00
										 |  |  | // errMissingAuthHeader means that Authorization header has missing value or it is empty.
 | 
					
						
							| 
									
										
										
										
											2015-09-19 05:48:01 +08:00
										 |  |  | var errMissingAuthHeaderValue = errors.New("Missing auth header value") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-18 10:17:33 +08:00
										 |  |  | // errInvalidAuthHeaderValue means that Authorization header is available but is malformed and not in
 | 
					
						
							| 
									
										
										
										
											2015-10-02 14:51:17 +08:00
										 |  |  | // accordance with signature v4.
 | 
					
						
							| 
									
										
										
										
											2015-09-19 05:48:01 +08:00
										 |  |  | var errInvalidAuthHeaderValue = errors.New("Invalid auth header value") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // errInvalidAuthHeaderPrefix means that Authorization header
 | 
					
						
							| 
									
										
										
										
											2015-10-02 14:51:17 +08:00
										 |  |  | // has a wrong prefix only supported value should be "AWS4-HMAC-SHA256".
 | 
					
						
							| 
									
										
										
										
											2015-09-19 05:48:01 +08:00
										 |  |  | var errInvalidAuthHeaderPrefix = errors.New("Invalid auth header prefix") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-18 10:17:33 +08:00
										 |  |  | // errMissingFieldsAuthHeader means that Authorization header is available but has some missing fields.
 | 
					
						
							| 
									
										
										
										
											2015-09-19 05:48:01 +08:00
										 |  |  | var errMissingFieldsAuthHeader = errors.New("Missing fields in auth header") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-18 10:17:33 +08:00
										 |  |  | // errMissingFieldsCredentialTag means that Authorization header credentials tag has some missing fields.
 | 
					
						
							| 
									
										
										
										
											2015-09-19 05:48:01 +08:00
										 |  |  | var errMissingFieldsCredentialTag = errors.New("Missing fields in crendential tag") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-18 10:17:33 +08:00
										 |  |  | // errMissingFieldsSignedHeadersTag means that Authorization header signed headers tag has some missing fields.
 | 
					
						
							| 
									
										
										
										
											2015-09-19 05:48:01 +08:00
										 |  |  | var errMissingFieldsSignedHeadersTag = errors.New("Missing fields in signed headers tag") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-18 10:17:33 +08:00
										 |  |  | // errMissingFieldsSignatureTag means that Authorization header signature tag has missing fields.
 | 
					
						
							| 
									
										
										
										
											2015-09-19 05:48:01 +08:00
										 |  |  | var errMissingFieldsSignatureTag = errors.New("Missing fields in signature tag") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-18 10:17:33 +08:00
										 |  |  | // errCredentialTagMalformed means that Authorization header credential tag is malformed.
 | 
					
						
							| 
									
										
										
										
											2015-09-19 05:48:01 +08:00
										 |  |  | var errCredentialTagMalformed = errors.New("Invalid credential tag malformed") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-18 10:17:33 +08:00
										 |  |  | // errInvalidRegion means that the region element from credential tag in Authorization header is invalid.
 | 
					
						
							| 
									
										
										
										
											2015-09-19 05:48:01 +08:00
										 |  |  | var errInvalidRegion = errors.New("Invalid region") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-18 10:17:33 +08:00
										 |  |  | // errAccessKeyIDInvalid means that the accessKeyID element from credential tag in Authorization header is invalid.
 | 
					
						
							| 
									
										
										
										
											2015-09-19 05:48:01 +08:00
										 |  |  | var errAccessKeyIDInvalid = errors.New("AccessKeyID invalid") | 
					
						
							| 
									
										
										
										
											2015-10-02 14:51:17 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | // errUnsupportedAlgorithm means that the provided X-Amz-Algorithm is unsupported.
 | 
					
						
							|  |  |  | var errUnsupportedAlgorithm = errors.New("Unsupported Algorithm") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-18 10:17:33 +08:00
										 |  |  | // errPolicyAlreadyExpired means that the client request carries an post policy header which is already expired.
 | 
					
						
							| 
									
										
										
										
											2015-10-02 14:51:17 +08: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") |