mirror of
https://github.com/minio/minio.git
synced 2024-12-26 23:25:54 -05:00
357a81e879
for erroneous Object Put requests. Other minor cleanups, to follow - https://github.com/golang/go/wiki/CodeReviewComments
42 lines
821 B
Go
42 lines
821 B
Go
package storage
|
|
|
|
type GenericError struct {
|
|
Bucket string
|
|
Path string
|
|
}
|
|
|
|
type ObjectExists struct {
|
|
Bucket string
|
|
Key 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
|
|
}
|
|
|
|
func (self ObjectExists) Error() string {
|
|
return "Object exists: " + self.Bucket + "#" + self.Key
|
|
}
|
|
|
|
func (self BucketNameInvalid) Error() string {
|
|
return "Bucket name invalid: " + self.Bucket
|
|
}
|
|
|
|
func (self BucketExists) Error() string {
|
|
return "Bucket exists: " + self.Bucket
|
|
}
|
|
|
|
func (self BucketNotFound) Error() string {
|
|
return "Bucket not Found: " + self.Bucket
|
|
}
|