uiserver

package
v0.0.0-...-1fe6fdb Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	ServerMetadata map[string]any
	Preloads       []Preload
}

func (*Data) AddPreloadURL

func (s *Data) AddPreloadURL(as, href string)

func (*Data) AddPreloadedData

func (s *Data) AddPreloadedData(
	key string,
	data any,
)

type DevServerOptions

type DevServerOptions struct {
	GetInjectedHTMLSegment func(*http.Request) []byte
}

type Handler

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

func NewDevStaticHandler

func NewDevStaticHandler(
	config *koanf.Koanf,
) *Handler

func (*Handler) DefaultPreloadData

func (c *Handler) DefaultPreloadData(f func(r *http.Request, data *Data))

func (*Handler) PreloadData

func (c *Handler) PreloadData(pattern string, f func(r *http.Request, data *Data))

func (*Handler) ServeHTTP

func (c *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Preload

type Preload struct {
	As   string
	Href string
}

Jump to

Keyboard shortcuts

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