Documentation ¶
Index ¶
Constants ¶
View Source
const ( ContentType = "Content-Type" ApplicationJSON = "application/json" )
Variables ¶
This section is empty.
Functions ¶
func CheckError ¶
func CheckError(w http.ResponseWriter, response interface{}) (bool, error)
func EncodeResponse ¶
func EncodeResponse(w http.ResponseWriter, response interface{}) error
EncodeResponse encodes a generic response
Types ¶
type Error ¶
Error is a wrapper struct that provides HTTP Status code to an error
func (Error) MarshalJSON ¶
MarshalJSON satisfies json.Marshaler
Click to show internal directories.
Click to hide internal directories.