Directories
¶
| Path | Synopsis |
|---|---|
|
Package auth provides a common interface for enforcing authentication in HTTP handlers, along with several implementations (JWT, OpenID Connect, shared secret, null and none).
|
Package auth provides a common interface for enforcing authentication in HTTP handlers, along with several implementations (JWT, OpenID Connect, shared secret, null and none). |
|
Package bootstrap provides middleware and HTTP handlers for serving embedded Bootstrap assets and appending references to them to HTML output.
|
Package bootstrap provides middleware and HTTP handlers for serving embedded Bootstrap assets and appending references to them to HTML output. |
|
static
Package static contains the embedded Bootstrap CSS and JavaScript assets.
|
Package static contains the embedded Bootstrap CSS and JavaScript assets. |
|
cmd
|
|
|
auth/example
command
Command example is a simple HTTP server that demonstrates using an `auth.Authenticator` to protect a handler.
|
Command example is a simple HTTP server that demonstrates using an `auth.Authenticator` to protect a handler. |
|
auth/jwt-secret
command
Command jwt-secret prints a random string suitable for use as a JWT signing secret.
|
Command jwt-secret prints a random string suitable for use as a JWT signing secret. |
|
cookie/encrypted-cookie
command
Command encrypted-cookie prints a new URI suitable for instantiating an `EncryptedCookie` instance.
|
Command encrypted-cookie prints a new URI suitable for instantiating an `EncryptedCookie` instance. |
|
crumb/encrypted-crumb
command
Command encrypted-crumb prints a new URI suitable for instantiating an `EncryptedCrumb` instance.
|
Command encrypted-crumb prints a new URI suitable for instantiating an `EncryptedCrumb` instance. |
|
fileserver/fileserver
command
Command fileserver serves files from a local directory over HTTP, with optional CORS, gzip, custom content type and custom response header support.
|
Command fileserver serves files from a local directory over HTTP, with optional CORS, gzip, custom content type and custom response header support. |
|
map-config-example
command
Command map-config-example is an example web server that serves a map configuration (at /map.json) and an embedded web application for displaying a map using that configuration.
|
Command map-config-example is an example web server that serves a map configuration (at /map.json) and an embedded web application for displaying a map using that configuration. |
|
server/example
command
Command example starts a simple "Hello, {host}" web server using a `server.Server` instance configured by a URI, optionally returning a 503 Service Unavailable response for all requests.
|
Command example starts a simple "Hello, {host}" web server using a `server.Server` instance configured by a URI, optionally returning a 503 Service Unavailable response for all requests. |
|
Package cookie provides a common interface for reading and writing HTTP cookies, including cookies whose values are encrypted.
|
Package cookie provides a common interface for reading and writing HTTP cookies, including cookies whose values are encrypted. |
|
Package crumb provides interfaces and implementations for generating and validating HTTP crumbs (CSRF tokens), along with middleware for assigning and checking them in HTTP handlers.
|
Package crumb provides interfaces and implementations for generating and validating HTTP crumbs (CSRF tokens), along with middleware for assigning and checking them in HTTP handlers. |
|
Package fault provides HTTP handlers and middleware for reporting errors in web applications, optionally rendering them with a custom HTML template.
|
Package fault provides HTTP handlers and middleware for reporting errors in web applications, optionally rendering them with a custom HTML template. |
|
Package fileserver provides HTTP handlers and middleware for serving files from a local directory.
|
Package fileserver provides HTTP handlers and middleware for serving files from a local directory. |
|
Package maps provides configuration types and HTTP handlers for web maps using Leaflet and Protomaps.
|
Package maps provides configuration types and HTTP handlers for web maps using Leaflet and Protomaps. |
|
static/www
Package www provides an embedded example web application for displaying maps.
|
Package www provides an embedded example web application for displaying maps. |
|
Package opensearch provides types and HTTP handlers for publishing OpenSearch description documents and advertising them to browsers.
|
Package opensearch provides types and HTTP handlers for publishing OpenSearch description documents and advertising them to browsers. |
|
Package response provides simple HTTP handlers for common responses.
|
Package response provides simple HTTP handlers for common responses. |
|
Package rewrite provides middleware for rewriting HTTP requests and the HTML content of HTTP responses.
|
Package rewrite provides middleware for rewriting HTTP requests and the HTML content of HTTP responses. |
|
Package rollup provides HTTP handlers that combine and minify multiple JavaScript or CSS files into a single response.
|
Package rollup provides HTTP handlers that combine and minify multiple JavaScript or CSS files into a single response. |
|
Package route provides an `http.Handler` that routes requests using `http.ServeMux` style patterns but defers initializing the handlers being routed to until they are needed.
|
Package route provides an `http.Handler` that routes requests using `http.ServeMux` style patterns but defers initializing the handlers being routed to until they are needed. |
|
Package sanitize provides helper functions for extracting and sanitising parameters from HTTP requests.
|
Package sanitize provides helper functions for extracting and sanitising parameters from HTTP requests. |
|
Package server provides a common interface, and a registry of implementations, for HTTP servers that can be instantiated from a URI.
|
Package server provides a common interface, and a registry of implementations, for HTTP servers that can be instantiated from a URI. |
|
Package slog provides helpers for deriving `log/slog` loggers decorated with details of HTTP requests.
|
Package slog provides helpers for deriving `log/slog` loggers decorated with details of HTTP requests. |
|
Package static provides handlers for serving static assets from an `fs.FS` instance and for appending references to those assets to HTML output.
|
Package static provides handlers for serving static assets from an `fs.FS` instance and for appending references to those assets to HTML output. |
|
wellknown
|
|
|
webfinger
Package webfinger defines types and constants for WebFinger (RFC 7033) responses.
|
Package webfinger defines types and constants for WebFinger (RFC 7033) responses. |
Click to show internal directories.
Click to hide internal directories.