utils

package
v0.0.0-...-1520c0e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2026 License: MIT Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL