Help us shape the future of Go! Take the 2026 Go Developer Survey

web

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: AGPL-3.0 Imports: 45 Imported by: 0

Documentation

Overview

Package web boots the shithub HTTP server. The full middleware stack (recover, request_id, logging, real-IP, timeout, compress, secure headers, CSRF, session, CORS, metrics, tracing), the chi router, the session store, the styled error pages, and the observability sinks (logging, metrics, tracing, error reporting) are composed here.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogoSVG

func LogoSVG() ([]byte, error)

LogoSVG returns the canonical mascot SVG bytes (full mark, with tentacles and pitchfork).

func Run

func Run(ctx context.Context, opts Options) error

Run boots the web server and blocks until shutdown.

func StaticFS

func StaticFS() fs.FS

StaticFS returns the read-only filesystem rooted at the static dir.

func TemplatesFS

func TemplatesFS() fs.FS

TemplatesFS returns the read-only filesystem rooted at the templates dir.

Types

type Options

type Options struct {
	Addr string
}

Options configures the web server. Addr overrides config when non-empty (preserves the existing --addr CLI flag behavior).

Directories

Path Synopsis
Package handlers registers HTTP handlers on the web server's mux.
Package handlers registers HTTP handlers on the web server's mux.
admin
Package admin owns the /admin/* surface — the operator dashboard for users/orgs/repos/jobs/audit/system management.
Package admin owns the /admin/* surface — the operator dashboard for users/orgs/repos/jobs/audit/system management.
api
Package api owns shithub's PAT-authenticated HTTP API surface.
Package api owns shithub's PAT-authenticated HTTP API surface.
auth
Package auth wires the email/password auth handlers (signup, login, logout, password reset, email verification) onto the chi router.
Package auth wires the email/password auth handlers (signup, login, logout, password reset, email verification) onto the chi router.
githttp
Package githttp wires the smart-HTTP git protocol routes: info/refs + git-upload-pack + git-receive-pack.
Package githttp wires the smart-HTTP git protocol routes: info/refs + git-upload-pack + git-receive-pack.
notifications
Package notifications wires the S29 notification web surface:
Package notifications wires the S29 notification web surface:
orgs
Package orgs wires the S30 organization web surface:
Package orgs wires the S30 organization web surface:
profile
Package profile owns the read-only public profile handlers: /{username} and /avatars/{username}.
Package profile owns the read-only public profile handlers: /{username} and /avatars/{username}.
repo
Package repo wires the HTTP handlers for repository creation and the (placeholder) repo home page.
Package repo wires the HTTP handlers for repository creation and the (placeholder) repo home page.
search
Package search wires the S28 web search surface.
Package search wires the S28 web search surface.
Package middleware provides shithub's HTTP middleware stack.
Package middleware provides shithub's HTTP middleware stack.
Package render owns the html/template loading and rendering pipeline.
Package render owns the html/template loading and rendering pipeline.

Jump to

Keyboard shortcuts

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