handlers

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RuntimeConfig added in v0.1.2

type RuntimeConfig struct {
	AuthProviderURL string `json:"authProviderURL"`
}

RuntimeConfig is injected into the served index.html as a nested global `window.ethpandaops.assertoor.config` so the SPA can read it synchronously at boot — no extra round-trip to the backend.

type SPAHandler

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

SPAHandler serves a React single-page application. It serves static files when they exist, otherwise falls back to index.html for client-side routing.

func NewSPAHandler

func NewSPAHandler(logger logrus.FieldLogger, runtimeConfig RuntimeConfig) (*SPAHandler, error)

NewSPAHandler creates a new SPA handler. The runtimeConfig is encoded into a small <script> block injected into the <head> of index.html before any other script runs.

func (*SPAHandler) ServeHTTP

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

ServeHTTP implements http.Handler.

Jump to

Keyboard shortcuts

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