Documentation ¶
Index ¶
- func BadRequestError(w http.ResponseWriter, msg string)
- func ForbiddenError(w http.ResponseWriter, msg string)
- func InternalServerError(w http.ResponseWriter, msg string)
- func JSON(w http.ResponseWriter, status int, v interface{})
- func NotFoundError(w http.ResponseWriter, msg string)
- func UnathorizedError(w http.ResponseWriter, msg string)
- type BoolResponse
- type Empty
- type Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BadRequestError ¶
func BadRequestError(w http.ResponseWriter, msg string)
BadRequestError helper.
func InternalServerError ¶
func InternalServerError(w http.ResponseWriter, msg string)
InternalServerError helper.
func JSON ¶
func JSON(w http.ResponseWriter, status int, v interface{})
JSON render encodes given data to JSON and writes it to response.
func UnathorizedError ¶
func UnathorizedError(w http.ResponseWriter, msg string)
UnathorizedError helper.
Types ¶
type BoolResponse ¶
type BoolResponse struct {
Status bool `json:"status"`
}
Click to show internal directories.
Click to hide internal directories.