serveui

package
v0.0.310 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssetVersion added in v0.0.118

func AssetVersion() string

AssetVersion returns a stable hash of the embedded UI assets.

func IndexHTML

func IndexHTML() []byte

IndexHTML returns the embedded UI page.

func RenderIndexHTML added in v0.0.118

func RenderIndexHTML(basePath, headSnippet string, opts RenderOptions) []byte

RenderIndexHTML returns the index page with versioned first-party assets, caller-supplied head markup, and optional feature scripts.

func RenderManifest added in v0.0.118

func RenderManifest() []byte

RenderManifest returns the manifest with versioned icon URLs. The returned slice is cached and must be treated as read-only.

func RenderServiceWorker added in v0.0.118

func RenderServiceWorker(opts RenderOptions) []byte

RenderServiceWorker returns the service worker with a versioned cache key, shell asset URLs, and optional feature assets. The returned slice is cached per option set and must be treated as read-only.

func StaticAsset added in v0.0.106

func StaticAsset(name string) ([]byte, error)

StaticAsset returns a copy of an embedded serve-ui asset.

Types

type RenderOptions added in v0.0.216

type RenderOptions struct {
	WebRTC bool
}

RenderOptions controls optional UI features included in rendered UI assets.

Jump to

Keyboard shortcuts

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