web

package
v0.0.31 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAssetHandler

func NewAssetHandler(assets http.FileSystem, basePath string) http.Handler

NewAssetHandler creates a new AssetHandler with the given file system.

func RenderIndexTemplate

func RenderIndexTemplate(raw []byte) ([]byte, error)

RenderIndexTemplate renders the given index.html content as a Go template, injecting configuration (e.g. Sentry settings) from environment variables. It returns an error if the template cannot be parsed or executed.

Types

type AssetHandler

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

AssetHandler serves static files from the assets filesystem and handles SPA routing by serving index.html for non-asset routes.

func (*AssetHandler) ServeHTTP

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

ServeHTTP implements the http.Handler interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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