Documentation ¶
Index ¶
- func GetResourcePath(c echo.Context) string
- type CfAPIError
- func BadQueryParameter(err error) *CfAPIError
- func InvalidAuthToken(err error) *CfAPIError
- func NotAuthenticated(err error) *CfAPIError
- func NotAuthorized(err error) *CfAPIError
- func ResourceNotFound(resourceType string, err error) *CfAPIError
- func TooManyRequests(err error) *CfAPIError
- func UnknownError(err error) *CfAPIError
- func UnprocessableEntity(detail string, err error) *CfAPIError
- type CfAPIErrors
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetResourcePath ¶
func GetResourcePath(c echo.Context) string
GetResourcePath returns the full url that was called by the web request
Types ¶
type CfAPIError ¶
type CfAPIError struct { HTTPStatus int `json:"-"` Detail string `json:"detail,omitempty"` Title string `json:"title"` Code int `json:"code"` Err error `json:"-"` }
func BadQueryParameter ¶
func BadQueryParameter(err error) *CfAPIError
func InvalidAuthToken ¶
func InvalidAuthToken(err error) *CfAPIError
func NotAuthenticated ¶
func NotAuthenticated(err error) *CfAPIError
func NotAuthorized ¶
func NotAuthorized(err error) *CfAPIError
func ResourceNotFound ¶
func ResourceNotFound(resourceType string, err error) *CfAPIError
func TooManyRequests ¶
func TooManyRequests(err error) *CfAPIError
func UnknownError ¶
func UnknownError(err error) *CfAPIError
func UnprocessableEntity ¶
func UnprocessableEntity(detail string, err error) *CfAPIError
func (*CfAPIError) Error ¶
func (e *CfAPIError) Error() string
func (*CfAPIError) Unwrap ¶
func (e *CfAPIError) Unwrap() error
type CfAPIErrors ¶
type CfAPIErrors struct {
Errors []CfAPIError `json:"errors"`
}
func AsErrors ¶
func AsErrors(errors ...CfAPIError) CfAPIErrors
Click to show internal directories.
Click to hide internal directories.