Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Folder ¶
type Folder struct { // Path is the path to the folder Path string `cfg:"path"` // Index is automatically redirect to index.html Index bool `cfg:"index"` // StripIndexName is strip index name from url StripIndexName bool `cfg:"strip_index_name"` // IndexName is the name of the index file, default is index.html IndexName string `cfg:"index_name"` // SPA is automatically redirect to index.html SPA bool `cfg:"spa"` // SPAEnableFile is enable .* file to be served to index.html if not found, default is false SPAEnableFile bool `cfg:"spa_enable_file"` // SPAIndex is set the index.html location, default is IndexName SPAIndex string `cfg:"spa_index"` // SPAIndexRegex set spa_index from URL path regex SPAIndexRegex []*RegexPathStore `cfg:"spa_index_regex"` // Browse is enable directory browsing Browse bool `cfg:"browse"` // UTC browse time format UTC bool `cfg:"utc"` // PrefixPath for strip prefix path for real file path PrefixPath string `cfg:"prefix_path"` // FilePathRegex is regex replacement for real file path, comes after PrefixPath apply // File path doesn't include / suffix FilePathRegex []*RegexPathStore `cfg:"file_path_regex"` CacheRegex []*RegexCacheStore `cfg:"cache_regex"` // BrowseCache is cache control for browse page, default is no-cache BrowseCache string `cfg:"browse_cache"` DisableFolderSlashRedirect bool `cfg:"disable_folder_slash_redirect"` // contains filtered or unexported fields }
func (*Folder) ServeContent ¶
func (f *Folder) ServeContent(w http.ResponseWriter, req *http.Request, name string, modtime time.Time, content io.ReadSeeker)
func (*Folder) SetFs ¶
func (f *Folder) SetFs(fs http.FileSystem)
type RegexCacheStore ¶
type RegexPathStore ¶
Click to show internal directories.
Click to hide internal directories.