Documentation ¶
Index ¶
- Constants
- func ErrorBadRequestStatus(message string) []byte
- func ErrorForbiddenStatus(message string) []byte
- func ErrorInternalServerStatus(message string) []byte
- func ErrorNotFoundStatus(message string) []byte
- func ErrorNotImplementedStatus(message string) []byte
- func ErrorUnauthorizedStatus(message string) []byte
- func HttpError(res *restful.Response, code int, format string, a ...interface{}) error
- func NewNotFoundError(msg string) error
- type ErrorSpec
- type NotFoundError
- type NotImplementError
Constants ¶
View Source
const ( // ErrorBadRequest ErrorBadRequest = 400 ErrorUnauthorized = 401 // ErrorForbidden ErrorForbidden = 403 // ErrorNotFound ErrorNotFound = 404 // ErrorInternalServer ErrorInternalServer = 500 // ErrorNotImplemented ErrorNotImplemented = 501 )
Variables ¶
This section is empty.
Functions ¶
func ErrorBadRequestStatus ¶
ErrorBadRequestStatus
func ErrorInternalServerStatus ¶
ErrorInternalServerStatus
func ErrorNotImplementedStatus ¶
ErrorNotImplementedStatus
func ErrorUnauthorizedStatus ¶
ErrorUnauthorizedStatus
func NewNotFoundError ¶
Types ¶
type ErrorSpec ¶
type ErrorSpec struct { Code int `json:"code,omitempty"` Message string `json:"message,omitempty"` }
ErrorSpec describes Detailed HTTP error response, which consists of a HTTP status code, and a custom error message unique for each failure case.
type NotFoundError ¶
type NotFoundError struct {
S string
}
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
type NotImplementError ¶
type NotImplementError struct {
S string
}
Volume group error
func (*NotImplementError) Error ¶
func (e *NotImplementError) Error() string
Click to show internal directories.
Click to hide internal directories.