static

package
v0.2.52 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const INDEX = "index.html"

Variables

This section is empty.

Functions

func LocalFile

func LocalFile(root string, indexes bool) *localFileSystem

func Serve

func Serve(urlPrefix string, fs ServeFileSystem) gin.HandlerFunc

Static returns a middleware handler that serves static files in the given directory.

func ServeRoot

func ServeRoot(urlPrefix, root string) gin.HandlerFunc

func SetUp added in v0.2.18

func SetUp() gin.HandlerFunc

Types

type ServeFileSystem

type ServeFileSystem interface {
	http.FileSystem
	Exists(prefix string, path string) bool
}

Directories

Path Synopsis
Package staticfiles provides middleware for serving static files from disk.
Package staticfiles provides middleware for serving static files from disk.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL