Documentation ¶
Index ¶
- Constants
- func EmbedFile(root pkger.Dir, indexes bool) *embedFileSystem
- func LocalFile(root string, indexes bool) *localFileSystem
- func Serve(urlPrefix string, fs ServeFileSystem) gin.HandlerFunc
- func ServeEmbedFile(c *gin.Context, name string)
- func ServeRoot(urlPrefix, root string) gin.HandlerFunc
- type ServeFileSystem
Constants ¶
View Source
const INDEX = "index.html"
Variables ¶
This section is empty.
Functions ¶
func Serve ¶
func Serve(urlPrefix string, fs ServeFileSystem) gin.HandlerFunc
Static returns a middleware handler that serves static files in the given directory.
func ServeEmbedFile ¶
func ServeRoot ¶
func ServeRoot(urlPrefix, root string) gin.HandlerFunc
Types ¶
type ServeFileSystem ¶
type ServeFileSystem interface { http.FileSystem Exists(prefix string, path string) bool }
Click to show internal directories.
Click to hide internal directories.