ginStatic

package module
v0.0.0-...-511b4d2 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2015 License: GPL-2.0 Imports: 6 Imported by: 0

README

ginStatic

An improved version of the static contrib middleware for the Gin Gonic framework that sets the cache-control headers

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LocalFile

func LocalFile(root string, indexes bool) *localFileSystem

func Serve

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

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

func ServeRoot

func ServeRoot(urlPrefix, root string, seconds int) gin.HandlerFunc

Types

type ServeFileSystem

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

Jump to

Keyboard shortcuts

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