mirror of
https://github.com/minio/minio.git
synced 2025-11-10 22:10:12 -05:00
Implement bucket policy handler and with galore of cleanup
This commit is contained in:
@@ -30,6 +30,10 @@ type ObjectExists struct {
|
||||
Key string
|
||||
}
|
||||
|
||||
type ApiNotImplemented struct {
|
||||
Api string
|
||||
}
|
||||
|
||||
type ObjectNotFound GenericObjectError
|
||||
|
||||
type GenericBucketError struct {
|
||||
@@ -68,15 +72,24 @@ func EmbedError(bucket, object string, err error) ImplementationError {
|
||||
}
|
||||
|
||||
type BackendCorrupted BackendError
|
||||
type BucketPolicyNotFound GenericBucketError
|
||||
type BucketNameInvalid GenericBucketError
|
||||
type BucketExists GenericBucketError
|
||||
type BucketNotFound GenericBucketError
|
||||
type ObjectNameInvalid GenericObjectError
|
||||
|
||||
func (self BucketPolicyNotFound) Error() string {
|
||||
return "Bucket policy not found for: " + self.Bucket
|
||||
}
|
||||
|
||||
func (self ObjectNotFound) Error() string {
|
||||
return "Object not Found: " + self.Bucket + "#" + self.Object
|
||||
}
|
||||
|
||||
func (self ApiNotImplemented) Error() string {
|
||||
return "Api not implemented: " + self.Api
|
||||
}
|
||||
|
||||
func (self ObjectExists) Error() string {
|
||||
return "Object exists: " + self.Bucket + "#" + self.Key
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user