errcode

package
v2.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 5 Imported by: 8

Documentation

Index

Constants

View Source
const (
	ErrorCodeBlobUnknown         = "BLOB_UNKNOWN"
	ErrorCodeBlobUploadInvalid   = "BLOB_UPLOAD_INVALID"
	ErrorCodeBlobUploadUnknown   = "BLOB_UPLOAD_UNKNOWN"
	ErrorCodeDigestInvalid       = "DIGEST_INVALID"
	ErrorCodeManifestBlobUnknown = "MANIFEST_BLOB_UNKNOWN"
	ErrorCodeManifestInvalid     = "MANIFEST_INVALID"
	ErrorCodeManifestUnknown     = "MANIFEST_UNKNOWN"
	ErrorCodeNameInvalid         = "NAME_INVALID"
	ErrorCodeNameUnknown         = "NAME_UNKNOWN"
	ErrorCodeSizeInvalid         = "SIZE_INVALID"
	ErrorCodeUnauthorized        = "UNAUTHORIZED"
	ErrorCodeDenied              = "DENIED"
	ErrorCodeUnsupported         = "UNSUPPORTED"
)

References:

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Code    string `json:"code"`
	Message string `json:"message"`
	Detail  any    `json:"detail,omitempty"`
}

Error represents a response inner error returned by the remote registry. References:

func (Error) Error

func (e Error) Error() string

Error returns a error string describing the error.

type ErrorResponse

type ErrorResponse struct {
	Method     string
	URL        *url.URL
	StatusCode int
	Errors     Errors
}

ErrorResponse represents an error response.

func (*ErrorResponse) Error

func (err *ErrorResponse) Error() string

Error returns a error string describing the error.

func (*ErrorResponse) Unwrap

func (err *ErrorResponse) Unwrap() error

Unwrap returns the internal errors of err if any.

type Errors

type Errors []Error

Errors represents a list of response inner errors returned by the remote server. References:

func (Errors) Error

func (errs Errors) Error() string

Error returns a error string describing the error.

func (Errors) Unwrap

func (errs Errors) Unwrap() error

Unwrap returns the inner error only when there is exactly one error.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL