Documentation
¶
Overview ¶
Package web serves silo's read-only HTML UI: repo list, refs, log, commit, and the gittuf RSL and policy viewers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(st *store.Store, gst *gitstore.Store, baseURL, forgeKeyID string, opts ...HandlerOption) http.Handler
Handler returns the web UI router. It does not handle the *.git/ transport paths; mount it after the git handler in serve.go. forgeKeyID is the SHA256 fingerprint of silo's witness key, used to label forge-signed RSL entries.
func StaticHandler ¶
StaticHandler serves the embedded stylesheet. Mount it at /static/ in the top-level router; it's separate from Handler because the /{owner}/{repo} wildcard routes conflict with /static/ under ServeMux's specificity rules.
Types ¶
type HandlerOption ¶
type HandlerOption func(*handler)
HandlerOption tunes web.Handler. The serve command passes WithPkgsStore so the Dependencies tab queries the same per-repo index the worker writes.
func WithPkgsStore ¶
func WithPkgsStore(ps *pkgs.Store) HandlerOption
WithPkgsStore injects the pkgs.Store used by the worker so the Dependencies tab and the rich rendering share a cache.