...

Package static

import "github.com/gin-gonic/contrib/static"
Overview
Index
Subdirectories

Overview ▾

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

type ServeFileSystem

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

Subdirectories

Name Synopsis
..
example
bindata
simple