Documentation ¶
Index ¶
- Constants
- type ErrorResponse
- func (e *ErrorResponse) BadRequest(logger lager.Logger, w http.ResponseWriter, err error, description string)
- func (e *ErrorResponse) Conflict(logger lager.Logger, w http.ResponseWriter, err error, description string)
- func (e *ErrorResponse) Forbidden(logger lager.Logger, w http.ResponseWriter, err error, description string)
- func (e *ErrorResponse) InternalServerError(logger lager.Logger, w http.ResponseWriter, err error, description string)
- func (e *ErrorResponse) NotAcceptable(logger lager.Logger, w http.ResponseWriter, err error, description string)
- func (e *ErrorResponse) NotFound(logger lager.Logger, w http.ResponseWriter, err error, description string)
- func (e *ErrorResponse) Unauthorized(logger lager.Logger, w http.ResponseWriter, err error, description string)
- type MetadataError
Constants ¶
View Source
const HTTP_ERROR_METRIC_NAME = "http_error"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
MetricsSender metricsSender
}
func (*ErrorResponse) BadRequest ¶
func (e *ErrorResponse) BadRequest(logger lager.Logger, w http.ResponseWriter, err error, description string)
func (*ErrorResponse) Conflict ¶
func (e *ErrorResponse) Conflict(logger lager.Logger, w http.ResponseWriter, err error, description string)
func (*ErrorResponse) Forbidden ¶
func (e *ErrorResponse) Forbidden(logger lager.Logger, w http.ResponseWriter, err error, description string)
func (*ErrorResponse) InternalServerError ¶
func (e *ErrorResponse) InternalServerError(logger lager.Logger, w http.ResponseWriter, err error, description string)
func (*ErrorResponse) NotAcceptable ¶
func (e *ErrorResponse) NotAcceptable(logger lager.Logger, w http.ResponseWriter, err error, description string)
func (*ErrorResponse) NotFound ¶
func (e *ErrorResponse) NotFound(logger lager.Logger, w http.ResponseWriter, err error, description string)
func (*ErrorResponse) Unauthorized ¶
func (e *ErrorResponse) Unauthorized(logger lager.Logger, w http.ResponseWriter, err error, description string)
type MetadataError ¶
type MetadataError struct {
// contains filtered or unexported fields
}
func NewMetadataError ¶
func NewMetadataError(internalError error, metadata map[string]interface{}) MetadataError
func (MetadataError) Error ¶
func (m MetadataError) Error() string
func (MetadataError) Metadata ¶
func (m MetadataError) Metadata() map[string]interface{}
Click to show internal directories.
Click to hide internal directories.