web

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package web provides an embedded admin dashboard for the pbflags feature flag system. It serves server-rendered HTML with htmx for dynamic updates, backed by the admin Store for persistence.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvConfig added in v0.5.0

type EnvConfig struct {
	Name         string // e.g. "production", "staging", "dev"
	Color        string // CSS color, e.g. "#f87171"
	Version      string // build version, e.g. "1.2.3"
	DevAssetsDir string // if set, read assets from disk for live reload (dev only)
}

EnvConfig holds environment display settings for the admin UI.

type Handler

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

Handler serves the admin web UI.

func NewHandler

func NewHandler(store *admin.Store, logger *slog.Logger, env ...EnvConfig) (*Handler, error)

NewHandler creates a web UI handler backed by the given store.

func (*Handler) Register

func (h *Handler) Register(mux *http.ServeMux)

Register adds web UI routes to the given mux, wrapped with CSRF protection.

Jump to

Keyboard shortcuts

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