minio/pkg/storage/storage_errors.go

38 lines
656 B
Go
Raw Normal View History

2015-01-21 02:16:06 -05:00
package storage
type GenericError struct {
bucket string
path string
}
type ObjectExists struct {
bucket string
key string
}
2015-01-21 03:50:23 -05:00
type BucketNameInvalid struct {
bucket string
}
type BucketExists struct {
bucket string
}
2015-01-21 02:16:06 -05:00
type ObjectNotFound GenericError
func (self ObjectNotFound) Error() string {
2015-01-21 03:50:23 -05:00
return "Object not Found: " + self.bucket + "#" + self.path
2015-01-21 02:16:06 -05:00
}
func (self ObjectExists) Error() string {
return "Object exists: " + self.bucket + "#" + self.key
}
2015-01-21 03:50:23 -05:00
func (self BucketNameInvalid) Error() string {
return "Bucket name invalid: " + self.bucket
}
func (self BucketExists) Error() string {
return "Bucket exists: " + self.bucket
}