Documentation
¶
Index ¶
- Constants
- func AddRoutes(mux *http.ServeMux, staticFilesPath string, ns uuid.UUID)
- func GetContentType(h http.Header, defaultType string) (string, map[string]string, error)
- func GetResponseMimeType(h http.Header, defaultType string, mimeTypes ...string) (string, error)
- func Index(ns uuid.UUID) http.Handler
Constants ¶
View Source
const ( MimeTypeTextCharset = "text/plain; charset=utf-8" MimeTypeHtmlCharset = "text/html; charset=utf-8" MimeTypeText = "text/plain" MimeTypeBytes = "application/octet-stream" MimeTypeHtml = "text/html" MimeTypeAll = "*/*" HeaderNameAccept = "accept" HeaderNameContentType = "content-type" HeaderNameHXRequest = "hx-request" )
Variables ¶
This section is empty.
Functions ¶
func AddRoutes ¶
AddRoutes adds web routes to the given mux. If localStaticFiles is true, the webapp will serve static files from the local filesystem. Otherwise, it will serve them from the embedded filesystem.
func GetContentType ¶
GetContentType returns the mime type and the parameters from the given content type.
func GetResponseMimeType ¶
GetResponseMimeType returns the mime type to be used for the response.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.