Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecoderErr ¶ added in v0.19.0
DecoderErr handles an error returned by json.NewDecoder(r.Body).Decode(&data) this function will determine the appropriate error response
Types ¶
type StandardResponse ¶ added in v0.19.0
type StandardResponse struct {
Path string `json:"path,omitempty"`
RequestID string `json:"request_id,omitempty"`
Data interface{} `json:"data"`
}
StandardResponse is meant to be included in all response bodies and includes "standard" response fields
func NewStandardResponse ¶ added in v0.19.0
func NewStandardResponse(r *http.Request, d interface{}) (*StandardResponse, error)
NewStandardResponse is an initializer for the StandardResponse struct
Click to show internal directories.
Click to hide internal directories.