Documentation
¶
Overview ¶
Package render provides the file content rendering for the web server.
Index ¶
- Variables
- func DizPool(buf *bytes.Buffer, art *models.File, extra dir.Directory) error
- func Encoder(art *models.File, r io.Reader) encoding.Encoding
- func InsertDiz(b []byte, diz []byte) []byte
- func NoScreenshot(art *models.File, previewPath string) bool
- func ReadmePool(buf, ruf *bytes.Buffer, art *models.File, download, extra dir.Directory) error
- func Viewer(art *models.File) bool
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DizPool ¶ added in v1.7.7
DizPool returns the content of the FILE_ID.DIZ file. The text is intended to be used as a readme, preview or an in-browser viewer.
func Encoder ¶
Encoder returns the encoding for the model file entry. Based on the platform and section. Otherwise it will attempt to determine the encoding from the file byte content.
func InsertDiz ¶ added in v1.5.1
InsertDiz inserts the FILE_ID.DIZ content into the existing byte content.
func NoScreenshot ¶
NoScreenshot returns true when the file entry should not attempt to display a screenshot. This is based on the platform, section or if the screenshot is missing on the server.
func ReadmePool ¶ added in v1.7.7
ReadmePool writes the content of either the file download or an extracted text file to the buffers. The text is intended to be used as a readme, preview or an in-browser viewer.
Both the buf buffer and the ruf rune buffer are reset before writing.
Types ¶
This section is empty.