web

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: CC0-1.0 Imports: 35 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package web serves Taskronin's loopback browser interface.

Index

Constants

View Source
const (
	SessionCookie = "tr_session"
	HTMXAsset     = "htmx-2.0.11.min.js"
	HTMXSHA256    = "d6fdc75f204e6bdefa99b69bf1e6d4ac69b8a364f77929f45c13476b4000f717"
	HTMXSize      = 52182
	CSP           = "" /* 152-byte string literal not displayed */
)

Browser protocol constants and the pinned, embedded htmx asset.

Variables

This section is empty.

Functions

func New

func New(o Options) (http.Handler, error)

New constructs the web handler, rejecting Listen unless it has a numeric port.

Types

type Options

type Options struct {
	Svc       *service.Service
	Clock     clock.Clock
	Zone      civil.Zone
	WeekStart time.Weekday
	Listen    string
	Logger    *slog.Logger
	// Observe reports the matched pattern and authenticated actor for access logs.
	Observe func(context.Context, string, domain.Actor)
}

Options supplies the service and configuration for the bound loopback listener.

Jump to

Keyboard shortcuts

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