Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Error ¶
Error is a responsex error
func Status ¶
func Status(status StatusCode, message ...string) *Error
Status transform status to error with message
func StatusMessage ¶
func StatusMessage(status StatusCode, args ...interface{}) *Error
StatusMessage transform status with formated message (with arguments)
func (*Error) SetHttpStatus ¶
SetHttpStatus set http status code
func (*Error) SetInternal ¶
SetInternal set internal / cause error
type Response ¶
type Response struct { HttpStatus int `json:"-"` Status int `json:"status"` Message string `json:"message"` Data interface{} `json:"data,omitempty"` }
Response represents RESTful response
func (*Response) SetHttpStatus ¶
SetHttpStatus set http response status
Click to show internal directories.
Click to hide internal directories.