Documentation
¶
Index ¶
- func LocalFile(root string, indexes bool) *localFileSystem
- func Serve(urlPrefix string, fs ServeFileSystem) gin.HandlerFunc
- func ServeCached(urlPrefix string, fs ServeFileSystem, cacheAge uint) gin.HandlerFunc
- func ServeEmbed(reqPath string, fsEmbed embed.FS) gin.HandlerFunc
- func ServeRoot(urlPrefix, root string) gin.HandlerFunc
- type Override
- type ServeFileSystem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Serve ¶
func Serve(urlPrefix string, fs ServeFileSystem) gin.HandlerFunc
Serve returns a middleware handler that serves static files in the given directory.
func ServeCached ¶
func ServeCached(urlPrefix string, fs ServeFileSystem, cacheAge uint) gin.HandlerFunc
ServeCached returns a middleware handler that similar as Serve but with the Cache-Control Header set as passed in the cacheAge parameter
func ServeRoot ¶
func ServeRoot(urlPrefix, root string) gin.HandlerFunc
Types ¶
Click to show internal directories.
Click to hide internal directories.