Remove unused and duplicate error types
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
parent
296a8415b9
commit
e0e13209d8
3 changed files with 3 additions and 33 deletions
|
@ -9,34 +9,6 @@ import (
|
|||
"github.com/docker/distribution/registry/api/v2"
|
||||
)
|
||||
|
||||
// BlobUploadNotFoundError is returned when making a blob upload operation against an
|
||||
// invalid blob upload location url.
|
||||
// This may be the result of using a cancelled, completed, or stale upload
|
||||
// location.
|
||||
type BlobUploadNotFoundError struct {
|
||||
Location string
|
||||
}
|
||||
|
||||
func (e *BlobUploadNotFoundError) Error() string {
|
||||
return fmt.Sprintf("No blob upload found at Location: %s", e.Location)
|
||||
}
|
||||
|
||||
// BlobUploadInvalidRangeError is returned when attempting to upload an image
|
||||
// blob chunk that is out of order.
|
||||
// This provides the known BlobSize and LastValidRange which can be used to
|
||||
// resume the upload.
|
||||
type BlobUploadInvalidRangeError struct {
|
||||
Location string
|
||||
LastValidRange int
|
||||
BlobSize int
|
||||
}
|
||||
|
||||
func (e *BlobUploadInvalidRangeError) Error() string {
|
||||
return fmt.Sprintf(
|
||||
"Invalid range provided for upload at Location: %s. Last Valid Range: %d, Blob Size: %d",
|
||||
e.Location, e.LastValidRange, e.BlobSize)
|
||||
}
|
||||
|
||||
// UnexpectedHTTPStatusError is returned when an unexpected HTTP status is
|
||||
// returned when making a registry api call.
|
||||
type UnexpectedHTTPStatusError struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue