handlers

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RootHandler

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

RootHandler is the Handler function for all incoming http requests

func NewRootHandler

func NewRootHandler(ps *path.Paths, notFound util.NotFound, defaultIndex, serverHeader string) RootHandler

NewRootHandler creates a new RootHandler object

func (RootHandler) ServeHTTP

func (h RootHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP redirects the task of handling based on if the file exist, the file should be hosted (based on Path rules), and if the file should not be hosted

Jump to

Keyboard shortcuts

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