Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
Middleware wraps River UI handler into standard Go HTTP middleware
func NewMiddleware ¶
NewMiddleware makes River UI middleware with given options
type Options ¶
type Options[TTx any] struct { // RiverClient is provided to initialize ui endpoints RiverClient *river.Client[TTx] // EndpointsTx is an optional transaction to wrap all database operations for api endpoints. // It's mainly used for testing. EndpointsTx *TTx // DevMode is whether the server is running in development mode DevMode bool // LiveFS is whether to use the live filesystem for the frontend. // This flag requires RIVER_UI_PROJECT_ROOT environment variable to be set. LiveFS bool // Logger is the logger to use logging errors within the handler Logger *slog.Logger // BaseURL is the path for reverse proxy (e.g. "/riverui") BaseURL string }
Options contains options for creating River UI middleware
Click to show internal directories.
Click to hide internal directories.