Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BuildJSONResponse = func(response ResponseInfo) ([]byte, error) { return json.MarshalIndent(&response, "", " ") }
BuildJSONResponse allows implementers to control the json response form from the api
View Source
var IgnoredFormFields []string
IgnoredFormFields are ignored by FormValues() when checking for extraneous fields
View Source
var Log = func(*http.Request, *Response, error) {}
Log allows logging of events and errors
View Source
var ResponseHeaders map[string]string
ResponseHeaders are returned with each response
View Source
var TraceEnabled = false
TraceEnabled Attaches a trace field to the JSON response when enabled.
Functions ¶
func FormValues ¶
func FormValues(r *http.Request, params interface{}, validationRules []*v.FieldRules) error
Types ¶
type ResponseInfo ¶ added in v2.4.2
type StatusError ¶
StatusError represents an error with an associated HTTP status code.
func (StatusError) Error ¶
func (se StatusError) Error() string
Click to show internal directories.
Click to hide internal directories.