Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorResponseForServer ¶
func ErrorResponseForServer(w http.ResponseWriter, r *http.Request, apiError error)
ErrorResponseForServer Marshals error for server requester
func JSONResponse ¶
func JSONResponse(w http.ResponseWriter, r *http.Request, result interface{})
JSONResponse Marshals response with header
func ReaderFileResponse ¶
func ReaderFileResponse(w http.ResponseWriter, r *http.Request, reader io.Reader, fileName, contentType string)
ReaderFileResponse writes the content from the reader to the response, and sets Content-Disposition=attachment; filename=<filename arg>
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.