Package errdefs defines a set of error interfaces that packages should use for communicating classes of errors. Errors that cross the package boundary should implement one (and only one) of these interfaces.
Packages should not reference these interfaces directly, only implement them. To check if a particular error implements one of these interfaces, there are helper functions provided (e.g. `Is<SomeError>`) which can be used rather than asserting the interfaces directly. If you must assert on these interfaces, be sure to check the causal chain (`err.Unwrap()`).
This section is empty.
IsCancelled returns if the passed in error is an ErrCancelled.
Deprecated: use containerd cerrdefs.IsCanceled
IsConflict returns if the passed in error is an ErrConflict.
Deprecated: use containerd cerrdefs.IsConflict
IsDataLoss returns if the passed in error is an ErrDataLoss.
Deprecated: use containerd cerrdefs.IsDataLoss
IsDeadline returns if the passed in error is an ErrDeadline.
Deprecated: use containerd cerrdefs.IsDeadlineExceeded
IsForbidden returns if the passed in error is an ErrForbidden.
Deprecated: use containerd cerrdefs.IsPermissionDenied
IsInvalidParameter returns if the passed in error is an ErrInvalidParameter.
Deprecated: use containerd cerrdefs.IsInvalidArgument
IsNotFound returns if the passed in error is an ErrNotFound,
Deprecated: use containerd cerrdefs.IsNotFound
IsNotImplemented returns if the passed in error is an ErrNotImplemented.
Deprecated: use containerd cerrdefs.IsNotImplemented
IsNotModified returns if the passed in error is an ErrNotModified.
Deprecated: use containerd cerrdefs.IsNotModified
IsSystem returns if the passed in error is an ErrSystem.
Deprecated: use containerd cerrdefs.IsInternal
IsUnauthorized returns if the passed in error is an ErrUnauthorized.
Deprecated: use containerd cerrdefs.IsUnauthorized
IsUnavailable returns if the passed in error is an ErrUnavailable.
Deprecated: use containerd cerrdefs.IsUnavailable
IsUnknown returns if the passed in error is an ErrUnknown.
Deprecated: use containerd cerrdefs.IsUnknown
Cancelled creates an ErrCancelled error from the given error. It returns the error as-is if it is either nil (no error) or already implements ErrCancelled,
Conflict creates an ErrConflict error from the given error. It returns the error as-is if it is either nil (no error) or already implements ErrConflict,
DataLoss creates an ErrDataLoss error from the given error. It returns the error as-is if it is either nil (no error) or already implements ErrDataLoss,
Deadline creates an ErrDeadline error from the given error. It returns the error as-is if it is either nil (no error) or already implements ErrDeadline,
Forbidden creates an ErrForbidden error from the given error. It returns the error as-is if it is either nil (no error) or already implements ErrForbidden,
FromContext returns the error class from the passed in context
FromStatusCode creates an errdef error, based on the provided HTTP status-code
Deprecated: Use cerrdefs.ToNative instead
IsContext returns if the passed in error is due to context cancellation or deadline exceeded.
NotFound creates an ErrNotFound error from the given error. It returns the error as-is if it is either nil (no error) or already implements ErrNotFound,
NotImplemented creates an ErrNotImplemented error from the given error. It returns the error as-is if it is either nil (no error) or already implements ErrNotImplemented,
NotModified creates an ErrNotModified error from the given error. It returns the error as-is if it is either nil (no error) or already implements NotModified,
System creates an ErrSystem error from the given error. It returns the error as-is if it is either nil (no error) or already implements ErrSystem,
Unauthorized creates an ErrUnauthorized error from the given error. It returns the error as-is if it is either nil (no error) or already implements ErrUnauthorized,
Unavailable creates an ErrUnavailable error from the given error. It returns the error as-is if it is either nil (no error) or already implements ErrUnavailable,
Unknown creates an ErrUnknown error from the given error. It returns the error as-is if it is either nil (no error) or already implements ErrUnknown,
type ErrCancelled interface { Cancelled() }
ErrCancelled signals that the action was cancelled.
type ErrConflict interface { Conflict() }
ErrConflict signals that some internal state conflicts with the requested action and can't be performed. A change in state should be able to clear this error.
type ErrDataLoss interface { DataLoss() }
ErrDataLoss indicates that data was lost or there is data corruption.
type ErrDeadline interface { DeadlineExceeded() }
ErrDeadline signals that the deadline was reached before the action completed.
type ErrForbidden interface { Forbidden() }
ErrForbidden signals that the requested action cannot be performed under any circumstances. When a ErrForbidden is returned, the caller should never retry the action.
type ErrInvalidParameter interface { InvalidParameter() }
ErrInvalidParameter signals that the user input is invalid
type ErrNotFound interface { NotFound() }
ErrNotFound signals that the requested object doesn't exist
type ErrNotImplemented interface { NotImplemented() }
ErrNotImplemented signals that the requested action/feature is not implemented on the system as configured.
type ErrNotModified interface { NotModified() }
ErrNotModified signals that an action can't be performed because it's already in the desired state
type ErrSystem interface { System() }
ErrSystem signals that some internal error occurred. An example of this would be a failed mount request.
type ErrUnauthorized interface { Unauthorized() }
ErrUnauthorized is used to signify that the user is not authorized to perform a specific action
type ErrUnavailable interface { Unavailable() }
ErrUnavailable signals that the requested action/subsystem is not available.
type ErrUnknown interface { Unknown() }
ErrUnknown signals that the kind of error that occurred is not known.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4