mirror of
https://github.com/regclient/regclient.git
synced 2025-04-18 22:44:00 +03:00
Error message linting
Signed-off-by: Brandon Mitchell <git@bmitch.net>
This commit is contained in:
parent
308b7e43a8
commit
895a3c9634
3
types/doc.go
Normal file
3
types/doc.go
Normal file
@ -0,0 +1,3 @@
|
||||
// Package types defines various types that have no other internal imports
|
||||
// This allows them to be used between other packages without creating import loops
|
||||
package types
|
@ -4,55 +4,55 @@ import "errors"
|
||||
|
||||
var (
|
||||
// ErrAllRequestsFailed when there are no mirrors left to try
|
||||
ErrAllRequestsFailed = errors.New("All requests failed")
|
||||
ErrAllRequestsFailed = errors.New("all requests failed")
|
||||
// ErrAPINotFound if an api is not available for the host
|
||||
ErrAPINotFound = errors.New("API not found")
|
||||
// ErrBackoffLimit maximum backoff attempts reached
|
||||
ErrBackoffLimit = errors.New("Backoff limit reached")
|
||||
ErrBackoffLimit = errors.New("backoff limit reached")
|
||||
// ErrCanceled if the context was canceled
|
||||
ErrCanceled = errors.New("Context was canceled")
|
||||
ErrCanceled = errors.New("context was canceled")
|
||||
// ErrDigestMismatch if the expected digest wasn't received
|
||||
ErrDigestMismatch = errors.New("Digest mismatch")
|
||||
ErrDigestMismatch = errors.New("digest mismatch")
|
||||
// ErrEmptyChallenge indicates an issue with the received challenge in the WWW-Authenticate header
|
||||
ErrEmptyChallenge = errors.New("Empty challenge header")
|
||||
// ErrHttpStatus if the http status code was unexpected
|
||||
ErrHttpStatus = errors.New("Unexpected http status code")
|
||||
ErrEmptyChallenge = errors.New("empty challenge header")
|
||||
// ErrHTTPStatus if the http status code was unexpected
|
||||
ErrHTTPStatus = errors.New("unexpected http status code")
|
||||
// ErrInvalidChallenge indicates an issue with the received challenge in the WWW-Authenticate header
|
||||
ErrInvalidChallenge = errors.New("Invalid challenge header")
|
||||
ErrInvalidChallenge = errors.New("invalid challenge header")
|
||||
// ErrMissingDigest returned when image reference does not include a digest
|
||||
ErrMissingDigest = errors.New("Digest missing from image reference")
|
||||
ErrMissingDigest = errors.New("digest missing from image reference")
|
||||
// ErrMissingLocation returned when the location header is missing
|
||||
ErrMissingLocation = errors.New("Location header missing")
|
||||
ErrMissingLocation = errors.New("location header missing")
|
||||
// ErrMissingName returned when name missing for host
|
||||
ErrMissingName = errors.New("Name missing")
|
||||
ErrMissingName = errors.New("name missing")
|
||||
// ErrMissingTag returned when image reference does not include a tag
|
||||
ErrMissingTag = errors.New("Tag missing from image reference")
|
||||
ErrMissingTag = errors.New("tag missing from image reference")
|
||||
// ErrMissingTagOrDigest returned when image reference does not include a tag or digest
|
||||
ErrMissingTagOrDigest = errors.New("Tag or Digest missing from image reference")
|
||||
ErrMissingTagOrDigest = errors.New("tag or Digest missing from image reference")
|
||||
// ErrMountReturnedLocation when a blob mount fails but a location header is received
|
||||
ErrMountReturnedLocation = errors.New("Blob mount returned a location to upload")
|
||||
ErrMountReturnedLocation = errors.New("blob mount returned a location to upload")
|
||||
// ErrNoNewChallenge indicates a challenge update did not result in any change
|
||||
ErrNoNewChallenge = errors.New("No new challenge")
|
||||
ErrNoNewChallenge = errors.New("no new challenge")
|
||||
// ErrNotFound isn't there, search for your value elsewhere
|
||||
ErrNotFound = errors.New("Not found")
|
||||
ErrNotFound = errors.New("not found")
|
||||
// ErrNotImplemented returned when method has not been implemented yet
|
||||
ErrNotImplemented = errors.New("Not implemented")
|
||||
ErrNotImplemented = errors.New("not implemented")
|
||||
// ErrParsingFailed when a string cannot be parsed
|
||||
ErrParsingFailed = errors.New("Parsing failed")
|
||||
ErrParsingFailed = errors.New("parsing failed")
|
||||
// ErrRateLimit when requests exceed server rate limit
|
||||
ErrRateLimit = errors.New("Rate limit exceeded")
|
||||
ErrRateLimit = errors.New("rate limit exceeded")
|
||||
// ErrRetryNeeded indicates a request needs to be retried
|
||||
ErrRetryNeeded = errors.New("Retry needed")
|
||||
ErrRetryNeeded = errors.New("retry needed")
|
||||
// ErrUnavailable when a requested value is not available
|
||||
ErrUnavailable = errors.New("Unavailable")
|
||||
ErrUnavailable = errors.New("unavailable")
|
||||
// ErrUnauthorized when authentication fails
|
||||
ErrUnauthorized = errors.New("Unauthorized")
|
||||
ErrUnauthorized = errors.New("unauthorized")
|
||||
// ErrUnsupported indicates the request was unsupported
|
||||
ErrUnsupported = errors.New("Unsupported")
|
||||
ErrUnsupported = errors.New("unsupported")
|
||||
// ErrUnsupportedAPI happens when an API is not supported on a registry
|
||||
ErrUnsupportedAPI = errors.New("Unsupported API")
|
||||
ErrUnsupportedAPI = errors.New("unsupported API")
|
||||
// ErrUnsupportedConfigVersion happens when config file version is greater than this command supports
|
||||
ErrUnsupportedConfigVersion = errors.New("Unsupported config version")
|
||||
ErrUnsupportedConfigVersion = errors.New("unsupported config version")
|
||||
// ErrUnsupportedMediaType returned when media type is unknown or unsupported
|
||||
ErrUnsupportedMediaType = errors.New("Unsupported media type")
|
||||
ErrUnsupportedMediaType = errors.New("unsupported media type")
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user