Documentation ¶
Index ¶
- func AsUnprocessableEntity(err error, detail string, errTypes ...ApiError) error
- func DropletForbiddenAsNotFound(err error) error
- func ForbiddenAsNotFound(err error) error
- func FromK8sError(err error, resourceType string) error
- func LogAndReturn(logger logr.Logger, err error, msg string, keysAndValues ...interface{}) error
- type ApiError
- type BadQueryParamValueError
- type BlobstoreUnavailableError
- type EndpointNotFoundError
- type ForbiddenError
- type InvalidAuthError
- type InvalidRequestError
- type MessageParseError
- type NotAuthenticatedError
- type NotFoundError
- type PackageBitsAlreadyUploadedError
- func (e PackageBitsAlreadyUploadedError) Code() int
- func (e PackageBitsAlreadyUploadedError) Detail() string
- func (e PackageBitsAlreadyUploadedError) Error() string
- func (e PackageBitsAlreadyUploadedError) HttpStatus() int
- func (e PackageBitsAlreadyUploadedError) Title() string
- func (e PackageBitsAlreadyUploadedError) Unwrap() error
- type ResourceNotReadyError
- type RollingDeployNotSupportedError
- func (e RollingDeployNotSupportedError) Code() int
- func (e RollingDeployNotSupportedError) Detail() string
- func (e RollingDeployNotSupportedError) Error() string
- func (e RollingDeployNotSupportedError) HttpStatus() int
- func (e RollingDeployNotSupportedError) Title() string
- func (e RollingDeployNotSupportedError) Unwrap() error
- type UniquenessError
- type UnknownError
- type UnknownKeyError
- type UnprocessableEntityError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsUnprocessableEntity ¶
func DropletForbiddenAsNotFound ¶
DropletForbiddenAsNotFound is a special case due to the CF CLI expecting the error message "Droplet not found" exactly instead of the generic case https://github.com/cloudfoundry/korifi/issues/965
func ForbiddenAsNotFound ¶
func FromK8sError ¶
Types ¶
type BadQueryParamValueError ¶
type BadQueryParamValueError struct {
// contains filtered or unexported fields
}
func NewBadQueryParamValueError ¶
func NewBadQueryParamValueError(key string, validValues ...string) BadQueryParamValueError
func (BadQueryParamValueError) HttpStatus ¶
func (e BadQueryParamValueError) HttpStatus() int
type BlobstoreUnavailableError ¶
type BlobstoreUnavailableError struct {
// contains filtered or unexported fields
}
func NewBlobstoreUnavailableError ¶
func NewBlobstoreUnavailableError(cause error) BlobstoreUnavailableError
func (BlobstoreUnavailableError) HttpStatus ¶
func (e BlobstoreUnavailableError) HttpStatus() int
type EndpointNotFoundError ¶ added in v0.7.0
type EndpointNotFoundError struct {
// contains filtered or unexported fields
}
func NewEndpointNotFoundError ¶ added in v0.7.0
func NewEndpointNotFoundError() EndpointNotFoundError
func (EndpointNotFoundError) Detail ¶ added in v0.7.0
func (e EndpointNotFoundError) Detail() string
func (EndpointNotFoundError) HttpStatus ¶ added in v0.7.0
func (e EndpointNotFoundError) HttpStatus() int
type ForbiddenError ¶
type ForbiddenError struct {
// contains filtered or unexported fields
}
func NewForbiddenError ¶
func NewForbiddenError(cause error, resourceType string) ForbiddenError
func (ForbiddenError) HttpStatus ¶
func (e ForbiddenError) HttpStatus() int
func (ForbiddenError) ResourceType ¶
func (e ForbiddenError) ResourceType() string
type InvalidAuthError ¶
type InvalidAuthError struct {
// contains filtered or unexported fields
}
func NewInvalidAuthError ¶
func NewInvalidAuthError(cause error) InvalidAuthError
func (InvalidAuthError) HttpStatus ¶
func (e InvalidAuthError) HttpStatus() int
type InvalidRequestError ¶
type InvalidRequestError struct {
// contains filtered or unexported fields
}
func NewInvalidRequestError ¶
func NewInvalidRequestError(cause error, detail string) InvalidRequestError
func (InvalidRequestError) HttpStatus ¶
func (e InvalidRequestError) HttpStatus() int
type MessageParseError ¶
type MessageParseError struct {
// contains filtered or unexported fields
}
func NewMessageParseError ¶
func NewMessageParseError(cause error) MessageParseError
func (MessageParseError) HttpStatus ¶
func (e MessageParseError) HttpStatus() int
type NotAuthenticatedError ¶
type NotAuthenticatedError struct {
// contains filtered or unexported fields
}
func NewNotAuthenticatedError ¶
func NewNotAuthenticatedError(cause error) NotAuthenticatedError
func (NotAuthenticatedError) HttpStatus ¶
func (e NotAuthenticatedError) HttpStatus() int
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
func NewNotFoundError ¶
func NewNotFoundError(cause error, resourceType string, additionalDetails ...string) NotFoundError
func (NotFoundError) HttpStatus ¶
func (e NotFoundError) HttpStatus() int
type PackageBitsAlreadyUploadedError ¶
type PackageBitsAlreadyUploadedError struct {
// contains filtered or unexported fields
}
func NewPackageBitsAlreadyUploadedError ¶
func NewPackageBitsAlreadyUploadedError(cause error) PackageBitsAlreadyUploadedError
func (PackageBitsAlreadyUploadedError) Detail ¶
func (e PackageBitsAlreadyUploadedError) Detail() string
func (PackageBitsAlreadyUploadedError) Error ¶
func (e PackageBitsAlreadyUploadedError) Error() string
func (PackageBitsAlreadyUploadedError) HttpStatus ¶
func (e PackageBitsAlreadyUploadedError) HttpStatus() int
type ResourceNotReadyError ¶ added in v0.7.0
type ResourceNotReadyError struct {
// contains filtered or unexported fields
}
func NewResourceNotReadyError ¶ added in v0.7.0
func NewResourceNotReadyError(cause error) ResourceNotReadyError
func (ResourceNotReadyError) Detail ¶ added in v0.7.0
func (e ResourceNotReadyError) Detail() string
func (ResourceNotReadyError) HttpStatus ¶ added in v0.7.0
func (e ResourceNotReadyError) HttpStatus() int
type RollingDeployNotSupportedError ¶ added in v0.8.0
type RollingDeployNotSupportedError struct {
// contains filtered or unexported fields
}
func NewRollingDeployNotSupportedError ¶ added in v0.8.0
func NewRollingDeployNotSupportedError(runnerName string) RollingDeployNotSupportedError
func (RollingDeployNotSupportedError) Code ¶ added in v0.8.0
func (e RollingDeployNotSupportedError) Code() int
func (RollingDeployNotSupportedError) Detail ¶ added in v0.8.0
func (e RollingDeployNotSupportedError) Detail() string
func (RollingDeployNotSupportedError) Error ¶ added in v0.8.0
func (e RollingDeployNotSupportedError) Error() string
func (RollingDeployNotSupportedError) HttpStatus ¶ added in v0.8.0
func (e RollingDeployNotSupportedError) HttpStatus() int
type UniquenessError ¶
type UniquenessError struct {
// contains filtered or unexported fields
}
func NewUniquenessError ¶
func NewUniquenessError(cause error, detail string) UniquenessError
func (UniquenessError) HttpStatus ¶
func (e UniquenessError) HttpStatus() int
type UnknownError ¶
type UnknownError struct {
// contains filtered or unexported fields
}
UnknownError is a generic wrapper over an error Korifi cannot recover from. Unknown errors should be only used by the presentation layer to present such an error to the user. Other components (handlers, repositories, etc.) should simply return the incoming error, it would be mapped to `UnknownError` by the presentation layer
func NewUnknownError ¶
func NewUnknownError(cause error) UnknownError
NewUnknownError creates an UnknownError. One should generally not create unknown errors as generic errors are automatically presented as unknown errors to the user
func (UnknownError) HttpStatus ¶
func (e UnknownError) HttpStatus() int
type UnknownKeyError ¶
type UnknownKeyError struct {
// contains filtered or unexported fields
}
func NewUnknownKeyError ¶
func NewUnknownKeyError(cause error, validKeys []string) UnknownKeyError
func (UnknownKeyError) HttpStatus ¶
func (e UnknownKeyError) HttpStatus() int
type UnprocessableEntityError ¶
type UnprocessableEntityError struct {
// contains filtered or unexported fields
}
func NewUnprocessableEntityError ¶
func NewUnprocessableEntityError(cause error, detail string) UnprocessableEntityError
func (UnprocessableEntityError) HttpStatus ¶
func (e UnprocessableEntityError) HttpStatus() int