singlepage

package module
v0.0.0-...-f3840e8 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2017 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const (
	EncodingNone   = 0
	EncodingGzip   = iota
	EncodingBrotli = iota
)

Variables

This section is empty.

Functions

func DefaultApplicationMatcher

func DefaultApplicationMatcher(path string) (bool, error)

func DefaultLongtermMatcher

func DefaultLongtermMatcher(path string) (bool, error)

Types

type FileInfo

type FileInfo struct {
	Path          string
	Etag          string
	IsDir         bool
	LongtermCache bool
}

type PathMatcher

type PathMatcher func(path string) (bool, error)

type SinglepageApplication

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

func NewSinglepageApplication

func NewSinglepageApplication(options SinglepageApplicationOptions) (*SinglepageApplication, error)

func (*SinglepageApplication) ServeHTTP

func (sa *SinglepageApplication) ServeHTTP(w http.ResponseWriter, req *http.Request)

type SinglepageApplicationOptions

type SinglepageApplicationOptions struct {
	Root                 string
	ApplicationMatcher   PathMatcher
	LongtermMatcher      PathMatcher
	CacheControl         string
	LongtermCacheControl string
}

Jump to

Keyboard shortcuts

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