mirror of
https://github.com/minio/minio.git
synced 2025-11-10 05:59:43 -05:00
Add public data-types for easier external loading (#5170)
This change brings public data-types such that we can ask projects to implement gateway projects externally than maintaining in our repo. All publicly exported structs are maintained in object-api-datatypes.go completePart --> CompletePart uploadMetadata --> MultipartInfo All other exported errors are at object-api-errors.go
This commit is contained in:
committed by
Nitish Tiwari
parent
7d3eaf79ff
commit
a4d6195244
@@ -263,13 +263,13 @@ func (e IncompleteBody) Error() string {
|
||||
|
||||
// InvalidRange - invalid range typed error.
|
||||
type InvalidRange struct {
|
||||
offsetBegin int64
|
||||
offsetEnd int64
|
||||
resourceSize int64
|
||||
OffsetBegin int64
|
||||
OffsetEnd int64
|
||||
ResourceSize int64
|
||||
}
|
||||
|
||||
func (e InvalidRange) Error() string {
|
||||
return fmt.Sprintf("The requested range \"bytes %d-%d/%d\" is not satisfiable.", e.offsetBegin, e.offsetEnd, e.resourceSize)
|
||||
return fmt.Sprintf("The requested range \"bytes %d-%d/%d\" is not satisfiable.", e.OffsetBegin, e.OffsetEnd, e.ResourceSize)
|
||||
}
|
||||
|
||||
// ObjectTooLarge error returned when the size of the object > max object size allowed (5G) per request.
|
||||
@@ -375,7 +375,7 @@ func (e UnsupportedMetadata) Error() string {
|
||||
return "Unsupported headers in Metadata"
|
||||
}
|
||||
|
||||
// Check if error type is IncompleteBody.
|
||||
// isErrIncompleteBody - Check if error type is IncompleteBody.
|
||||
func isErrIncompleteBody(err error) bool {
|
||||
err = errorCause(err)
|
||||
switch err.(type) {
|
||||
@@ -385,7 +385,7 @@ func isErrIncompleteBody(err error) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// Check if error type is BucketPolicyNotFound.
|
||||
// isErrBucketPolicyNotFound - Check if error type is BucketPolicyNotFound.
|
||||
func isErrBucketPolicyNotFound(err error) bool {
|
||||
err = errorCause(err)
|
||||
switch err.(type) {
|
||||
@@ -395,7 +395,7 @@ func isErrBucketPolicyNotFound(err error) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// Check if error type is ObjectNotFound.
|
||||
// isErrObjectNotFound - Check if error type is ObjectNotFound.
|
||||
func isErrObjectNotFound(err error) bool {
|
||||
err = errorCause(err)
|
||||
switch err.(type) {
|
||||
|
||||
Reference in New Issue
Block a user