# Packages
Package etcd provides conversion of etcd errors to API errors.
# Functions
FromObject generates an StatusError from an api.Status, if that is the type of obj; otherwise, returns an UnexpecteObjectError.
IsAlreadyExists determines if the err is an error which indicates that a specified resource already exists.
IsBadRequest determines if err is an error which indicates that the request is invalid.
IsConflict determines if the err is an error which indicates the provided update conflicts.
IsForbidden determines if err is an error which indicates that the request is forbidden and cannot be completed as requested.
IsInvalid determines if the err is an error which indicates the provided resource is not valid.
IsMethodNotSupported determines if the err is an error which indicates the provided action could not be performed because it is not supported by the server.
IsNotFound returns true if the specified error was created by NewNotFoundErr.
IsServerTimeout determines if err is an error which indicates that the request needs to be retried by the client.
IsStatusError determines if err is an API Status error received from the master.
IsUnexpectedObjectError determines if err is due to an unexpected object from the master.
NewAlreadyExists returns an error indicating the item requested exists by that identifier.
NewBadRequest creates an error that indicates that the request is invalid and can not be processed.
NewConflict returns an error indicating the item can't be updated as provided.
NewFieldDuplicate returns a *ValidationError indicating "duplicate value".
NewFieldForbidden returns a *ValidationError indicating "forbidden".
NewFieldInvalid returns a *ValidationError indicating "invalid value".
NewFieldNotFound returns a *ValidationError indicating "value not found".
NewFieldNotSupported returns a *ValidationError indicating "unsupported value".
NewFieldRequired returns a *ValidationError indicating "value required" TODO: remove "value".
No description provided by the author
NewForbidden returns an error indicating the requested action was forbidden.
NewInternalError returns an error indicating the item is invalid and cannot be processed.
NewInvalid returns an error indicating the item is invalid and cannot be processed.
NewMethodNotSupported returns an error indicating the requested action is not supported on this kind.
NewNotFound returns a new error which indicates that the resource of the kind and the name was not found.
NewServerTimeout returns an error indicating the requested action could not be completed due to a transient error, and the client should try again.
NewTimeoutError returns an error indicating that a timeout occurred before the request could be completed.
NewValidationErrorFieldPrefixMatcher returns an errors.Matcher that returns true if the provided error is a ValidationError and has a field with the provided prefix.
NewValidationErrorFieldPrefixMatcher returns an errors.Matcher that returns true if the provided error is a ValidationError and has the provided ValidationErrorType.
# Constants
HTTP recommendations are for servers to define 5xx error codes for scenarios not covered by behavior.
HTTP Status codes not in the golang http package.
HTTP Status codes not in the golang http package.
ValidationErrorTypeDuplicate is used to report collisions of values that must be unique (e.g.
ValidationErrorTypeForbidden is used to report valid (as per formatting rules) values which would be accepted by some api instances, but which would invoke behavior not permitted by this api instance (such as due to stricter security policy).
ValidationErrorTypeInvalid is used to report malformed values (e.g.
ValidationErrorTypeNotFound is used to report failure to find a requested value (e.g.
ValidationErrorTypeNotSupported is used to report valid (as per formatting rules) values that can not be handled (e.g.
ValidationErrorTypeRequired is used to report required values that are not provided (e.g.
ValidationErrorTypeTooLong is used to report that given value is too long.
# Structs
StatusError is an error intended for consumption by a REST API server; it can also be reconstructed by clients from a REST response.
UnexpectedObjectError can be returned by FromObject if it's passed a non-status object.
ValidationError is an implementation of the 'error' interface, which represents an error of validation.
# Type aliases
No description provided by the author
ValidationErrorType is a machine readable value providing more detail about why a field is invalid.