Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var New = errors.New
New is a drop in replacement for standar errors package
Functions ¶
Types ¶
type HTTPError ¶
type HTTPError interface { GetStatusCode() int GetResponse() interface{} }
HTTPError is an interface for structured errors
type Response ¶
type Response struct { StatusCode int `json:"-"` Code string `json:"code,omitempty"` Detail string `json:"detail,omitempty"` }
Response is the default structure of an error response
func (Response) GetResponse ¶ added in v0.1.1
func (e Response) GetResponse() interface{}
GetResponse returns the same object
func (Response) GetStatusCode ¶
GetStatusCode returns the status code
Click to show internal directories.
Click to hide internal directories.