Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorAuthForbidden = Error{ Type: "auth", Error: "forbidden", } ErrorNotAllowed = Error{ Type: "access", Error: "not allowed", } ErrorUrlInvalid = Error{ Type: "query", Field: "url", Error: "invalid", } ErrorHashInvalid = Error{ Type: "query", Field: "md5", Error: "invalid", } )
View Source
var EmptyPayload interface{}
Functions ¶
This section is empty.
Types ¶
type Response ¶
type Response struct { Success bool `json:"success"` Errors []Error `json:"errors,omitempty"` Payload interface{} `json:"payload,omitempty"` Timestamp int64 `json:"ts,omitempty"` }
func ErrorResponse ¶
func SuccessResponse ¶
func SuccessResponse(payload interface{}) *Response
Click to show internal directories.
Click to hide internal directories.