mirror of
https://github.com/minio/minio.git
synced 2025-11-10 22:10:12 -05:00
Add bucket to be part of object struct, reply back with BucketNotFound
for erroneous Object Put requests. Other minor cleanups, to follow - https://github.com/golang/go/wiki/CodeReviewComments
This commit is contained in:
@@ -10,16 +10,16 @@ type ObjectExists struct {
|
||||
Key string
|
||||
}
|
||||
|
||||
type BucketNameInvalid struct {
|
||||
Bucket string
|
||||
}
|
||||
|
||||
type BucketExists struct {
|
||||
Bucket string
|
||||
}
|
||||
|
||||
type ObjectNotFound GenericError
|
||||
|
||||
type GenericBucketError struct {
|
||||
Bucket string
|
||||
}
|
||||
|
||||
type BucketNameInvalid GenericBucketError
|
||||
type BucketExists GenericBucketError
|
||||
type BucketNotFound GenericBucketError
|
||||
|
||||
func (self ObjectNotFound) Error() string {
|
||||
return "Object not Found: " + self.Bucket + "#" + self.Path
|
||||
}
|
||||
@@ -35,3 +35,7 @@ func (self BucketNameInvalid) Error() string {
|
||||
func (self BucketExists) Error() string {
|
||||
return "Bucket exists: " + self.Bucket
|
||||
}
|
||||
|
||||
func (self BucketNotFound) Error() string {
|
||||
return "Bucket not Found: " + self.Bucket
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user