1
0
mirror of https://github.com/mayflower/docker-ls.git synced 2025-11-28 00:01:09 +03:00

Tag listing, fix potential deadlock if the response does not respect the page size.

This commit is contained in:
Christian Speckner
2016-02-16 13:03:26 +01:00
parent 63ae11c6e0
commit f613ce4501
9 changed files with 324 additions and 92 deletions

View File

@@ -8,6 +8,7 @@ type AutorizationError string
type NotImplementedByRemoteError string
type MalformedResponseError string
type InvalidStatusCodeError string
type NotFoundError string
var genericAuthorizationError AutorizationError = "autorization failed"
var genericMalformedResponseError MalformedResponseError = "malformed response"
@@ -28,6 +29,14 @@ func (e InvalidStatusCodeError) Error() string {
return string(e)
}
func (e NotFoundError) Error() string {
return string(e)
}
func newInvalidStatusCodeError(code int) error {
return InvalidStatusCodeError(fmt.Sprintf("invalid API response status %d", code))
}
func newNotFoundError(description string) error {
return NotFoundError(description)
}