frontend

package
v1.3.0-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2019 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Frontend

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

func NewFrontendFromEmbedded

func NewFrontendFromEmbedded(chroot string) *Frontend

func NewFrontendFromPath

func NewFrontendFromPath(path string, chroot string) (*Frontend, error)

func (*Frontend) AssetHandler

func (f *Frontend) AssetHandler(w http.ResponseWriter, r *http.Request)

Serves the frontend's assets.

Handles these kinds of URLs:

/assets/css/base.css
/static/css/main.41064805.css

func (Frontend) MountHTTPHandlers

func (f Frontend) MountHTTPHandlers()

func (*Frontend) RootHandler

func (f *Frontend) RootHandler(w http.ResponseWriter, r *http.Request)

Serves the frontend's index.html.

Handles these kinds of URLs:

/
/index.html
/* <catch all>

Jump to

Keyboard shortcuts

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