Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendFile ¶
func SendFile(w http.ResponseWriter, filePath string) error
SendFile attempts to transfer the specified file to the ResponseWriter.
func WriteHTML ¶
func WriteHTML(w http.ResponseWriter, str string)
WriteHTML sets the Content-Type to text/html and writes the string.
func WriteJSON ¶
func WriteJSON(w http.ResponseWriter, obj interface{}, indent string)
WriteJSON writes the specified object as JSON, using the specified indentation string.
func WritePlainText ¶
func WritePlainText(w http.ResponseWriter, str string)
WritePlainText sets the Content-Type to text/plain and writes the string.
Types ¶
type Upload ¶
type Upload struct { UID string `json:"uid"` FileName string `json:"file_name"` Size int64 `json:"file_size"` }
Upload describes an uploaded file
type UploadResponse ¶
UploadResponse describes and uploaded file, including user's JWT needed for later access.
Click to show internal directories.
Click to hide internal directories.