sectionmux

package
v0.0.0-...-f34a01f Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2019 License: BSD-2-Clause-Views Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SectionMux

type SectionMux struct {
	// contains filtered or unexported fields
}

SectionMux serves as a way to map webfs to sub domains

func NewSectionMux

func NewSectionMux(fsmap webfs.FsMap) SectionMux

NewSectionMux initializes a new SectionMux

func (SectionMux) Lookup

func (sm SectionMux) Lookup(host string) webfs.Webfs

Lookup checks stored list of webfs before attempting to create a new one

func (SectionMux) Parse

func (sm SectionMux) Parse(path string) (webfs.Webfs, error)

Parse adds webfs from directory

func (SectionMux) ServeHTTP

func (sm SectionMux) ServeHTTP(w http.ResponseWriter, r *http.Request)

Maps request to file system and serves content

Jump to

Keyboard shortcuts

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