Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( APIErrBadRequest = APIError{http.StatusBadRequest, "invalid request", nil} APIErrForbidden = APIError{http.StatusForbidden, "forbidden", nil} APIErrNotFound = APIError{http.StatusNotFound, "requested resource is not found", nil} APIErrBadMethod = APIError{http.StatusMethodNotAllowed, "method not allowed", nil} APIErrConflict = APIError{http.StatusConflict, "conflicted", nil} APIErrLengthRequired = APIError{http.StatusLengthRequired, "content-length is required", nil} APIErrTooLargeAsset = APIError{http.StatusRequestEntityTooLarge, "too large asset", nil} )
Common API errors
Functions ¶
This section is empty.
Types ¶
type APIError ¶
APIError is to define REST API errors.
func BadRequest ¶
BadRequest creates an APIError that describes what was bad in the request.
func InternalServerError ¶
InternalServerError creates an APIError.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server keeps coild internal status.
Click to show internal directories.
Click to hide internal directories.