frontend

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LabctlFileServer

func LabctlFileServer(url string) http.Handler

func SinglePageAppFileServer

func SinglePageAppFileServer(hfs fs.FS, urlRoot, fsRoot string) http.Handler

Types

type ReplaceText added in v0.0.12

type ReplaceText struct {
	File http.File
	Url  string
}

func (ReplaceText) Close added in v0.0.12

func (r ReplaceText) Close() error

func (ReplaceText) Read added in v0.0.12

func (r ReplaceText) Read(p []byte) (int, error)

func (ReplaceText) Readdir added in v0.0.12

func (r ReplaceText) Readdir(count int) ([]fs.FileInfo, error)

func (ReplaceText) Seek added in v0.0.12

func (r ReplaceText) Seek(offset int64, whence int) (int64, error)

func (ReplaceText) Stat added in v0.0.12

func (r ReplaceText) Stat() (fs.FileInfo, error)

type SPAFileSystem

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

FileSystem custom file system handler

func (SPAFileSystem) Open

func (spafs SPAFileSystem) Open(path string) (http.File, error)

Open file with fallback to index.html https://gist.github.com/hauxe/f2ea1901216177ccf9550a1b8bd59178#file-http_static_correct-go

type SlashFix

type SlashFix struct {
	Mux http.Handler
}

func (*SlashFix) ServeHTTP

func (h *SlashFix) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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