ui

package
v0.0.0-...-47cc4bd Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: AGPL-3.0, AGPL-3.0-or-later Imports: 9 Imported by: 0

README

Packages

We are using yarn 0.19.1.

Run yarn run to see a list of available tasks.

Adding new packages

To add a new package, run

yarn add packageName

Adding devDependency

yarn add --dev packageName

Updating a package

First, run

yarn outdated

... to determine which packages may need upgrading.

We really should not upgrade all packages at once, but, one at a time and make darn sure to test.

To upgrade a single package named packageName:

yarn upgrade packageName

Testing

Tests can be run via command line with yarn test, from within the /ui directory. For more detailed reporting, use yarn test -- --reporters=verbose.

Documentation

Index

Constants

View Source
const (
	// Default page to load (upon a miss)
	DefaultPage = "index.html"
	// DefaultPageContentType is the content-type of the DefaultPage
	DefaultPageContentType = "text/html; charset=utf-8"
)

Variables

This section is empty.

Functions

func GetVersion

func GetVersion() string

GetVersion returns version of the packed assets

Types

type BindataAssets

type BindataAssets struct {
}

BindataAssets serves embedded ui assets and also serves its index.html by default in order to support single-page react-apps with its own router.

func (*BindataAssets) Handler

func (b *BindataAssets) Handler() http.Handler

Handler returns HTTP handler that serves embedded data

func (*BindataAssets) ServeHTTP

func (b *BindataAssets) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP wraps http.FileServer by returning a default asset if the asset doesn't exist. This supports single-page react-apps with its own built-in router. Additionally, we override the content-type if the Default file is used.

Jump to

Keyboard shortcuts

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