Documentation
¶
Index ¶
- Constants
- func FromDoRequestError(req *http.Request, err error) error
- func FromNewRequestError(method, url string, err error) error
- func FromResponse(resp *http.Response) error
- func IgnoreNotFound(err error) error
- func IsBadRequest(err error) bool
- func IsNetworkError(err error) bool
- func IsNotFound(err error) bool
- func IsRecoverable(err error) bool
- func IsServerError(err error) bool
- func IsUnauthorized(err error) bool
- func NewContextError(err error) error
- func NewNotFoundError() error
- func NewUnrecoverableError(message string) error
- type AdmissionError
- type AdmissionErrors
- func (errs *AdmissionErrors) Add(err *AdmissionError)
- func (errs *AdmissionErrors) AddSevere(message string)
- func (errs *AdmissionErrors) AddSeveref(format string, args ...any)
- func (errs *AdmissionErrors) AddWarning(message string)
- func (errs *AdmissionErrors) AddWarningf(format string, args ...any)
- func (errs *AdmissionErrors) IsSevere() bool
- func (errs *AdmissionErrors) Map() (admission.Warnings, error)
- func (errs *AdmissionErrors) MergeWith(other *AdmissionErrors)
- type ContextError
- type ServerError
- type Severity
- type UnrecoverableError
Constants ¶
View Source
const ( Severe = Severity("severe") Warning = Severity("warning") )
Variables ¶
This section is empty.
Functions ¶
func FromNewRequestError ¶
func FromResponse ¶
func IgnoreNotFound ¶
func IsBadRequest ¶
func IsNetworkError ¶
func IsNotFound ¶
func IsRecoverable ¶
func IsServerError ¶
func IsUnauthorized ¶
func NewContextError ¶
func NewNotFoundError ¶
func NewNotFoundError() error
func NewUnrecoverableError ¶
Types ¶
type AdmissionError ¶
func NewSevere ¶
func NewSevere(message string) *AdmissionError
func NewSeveref ¶
func NewSeveref(format string, args ...any) *AdmissionError
func NewWarning ¶
func NewWarning(message string) *AdmissionError
func NewWarningf ¶
func NewWarningf(format string, args ...any) *AdmissionError
func (*AdmissionError) Error ¶
func (err *AdmissionError) Error() string
type AdmissionErrors ¶
type AdmissionErrors struct { Warning []*AdmissionError Severe []*AdmissionError }
func NewAdmissionErrors ¶
func NewAdmissionErrors() *AdmissionErrors
func (*AdmissionErrors) Add ¶
func (errs *AdmissionErrors) Add(err *AdmissionError)
func (*AdmissionErrors) AddSevere ¶
func (errs *AdmissionErrors) AddSevere(message string)
func (*AdmissionErrors) AddSeveref ¶
func (errs *AdmissionErrors) AddSeveref(format string, args ...any)
func (*AdmissionErrors) AddWarning ¶
func (errs *AdmissionErrors) AddWarning(message string)
func (*AdmissionErrors) AddWarningf ¶
func (errs *AdmissionErrors) AddWarningf(format string, args ...any)
func (*AdmissionErrors) IsSevere ¶
func (errs *AdmissionErrors) IsSevere() bool
func (*AdmissionErrors) MergeWith ¶
func (errs *AdmissionErrors) MergeWith(other *AdmissionErrors)
type ContextError ¶
type ContextError struct {
// contains filtered or unexported fields
}
func (ContextError) Is ¶
func (e ContextError) Is(err error) bool
Redirects the behavior of Is to As because Is is not implemented for k8s.io errors aggregate.
type ServerError ¶
type ServerError struct { StatusCode int `json:"status"` URL string `json:"url"` Method string `json:"method"` Message string `json:"message"` Body string `json:"body"` }
func NewServerError ¶
func NewServerError(resp *http.Response) ServerError
func (ServerError) Error ¶
func (err ServerError) Error() string
func (ServerError) IsRecoverable ¶
func (err ServerError) IsRecoverable() bool
type UnrecoverableError ¶
type UnrecoverableError struct {
// contains filtered or unexported fields
}
func (UnrecoverableError) Error ¶
func (err UnrecoverableError) Error() string
Click to show internal directories.
Click to hide internal directories.