Documentation ¶
Index ¶
- Constants
- func BadRequestResponse(rw http.ResponseWriter, err *JSONErr)
- func ErrorResponse(rw http.ResponseWriter, sttCode int, err *JSONErr)
- func ForbiddenResponse(rw http.ResponseWriter, err *JSONErr)
- func InternalErrorResponse(rw http.ResponseWriter, err *JSONErr)
- func UnauthorizedResponse(rw http.ResponseWriter, err *JSONErr)
- type JSONErr
Constants ¶
View Source
const ( ErrCodeUnknown float32 = 0.0 ErrCodeNotLogged float32 = 0.1 ErrNoPermission float32 = 0.2 )
Variables ¶
This section is empty.
Functions ¶
func BadRequestResponse ¶
func BadRequestResponse(rw http.ResponseWriter, err *JSONErr)
func ErrorResponse ¶
func ErrorResponse(rw http.ResponseWriter, sttCode int, err *JSONErr)
func ForbiddenResponse ¶
func ForbiddenResponse(rw http.ResponseWriter, err *JSONErr)
func InternalErrorResponse ¶
func InternalErrorResponse(rw http.ResponseWriter, err *JSONErr)
func UnauthorizedResponse ¶
func UnauthorizedResponse(rw http.ResponseWriter, err *JSONErr)
Types ¶
Click to show internal directories.
Click to hide internal directories.