Versions in this module Expand all Collapse all v1 v1.0.0 Sep 8, 2020 Changes in this version + type ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, fs *FileServer, errorCode int) (doNotContinue bool) + func JSONErrorHandler() ErrorHandlerFunc + func StaticHTMLPageErrorHandler() ErrorHandlerFunc + type ErrorPageTemplate string + func (t ErrorPageTemplate) Build(errorCode int) string + func (t ErrorPageTemplate) String() string + type FileServer struct + Cache cache.Cacher + ErrorHandlers []ErrorHandlerFunc + FallbackErrorContent string + Settings Settings + func NewFileServer(s Settings) (*FileServer, error) + func (fs *FileServer) CacheAvailable() bool + func (fs *FileServer) ServeHTTP(w http.ResponseWriter, r *http.Request) + type Settings struct + AllowedHTTPMethods []string + CacheEnabled bool + CacheMaxFileSize int64 + CacheMaxItems uint32 + CacheTTL time.Duration + ErrorFileName string + FilesRoot string + IndexFileName string + RedirectIndexFileToRoot bool