spa_handler

package
v1.1.11 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SpaHandler

func SpaHandler(location string, contextRoot string, indexFile string) http.Handler

SpaHandler returns a request handler (http.Handler) that serves a single page application from a given public directory (location).

Types

type SinglePageAppHandler

type SinglePageAppHandler struct {
	HttpHandler http.Handler
	BindingKey  string
}

func (*SinglePageAppHandler) Binding

func (spa *SinglePageAppHandler) Binding() string

func (*SinglePageAppHandler) IsHandler

func (spa *SinglePageAppHandler) IsHandler(r *http.Request) bool

func (*SinglePageAppHandler) Options

func (spa *SinglePageAppHandler) Options() map[interface{}]interface{}

func (*SinglePageAppHandler) RootPath

func (spa *SinglePageAppHandler) RootPath() string

func (*SinglePageAppHandler) ServeHTTP

func (spa *SinglePageAppHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)

Jump to

Keyboard shortcuts

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