web

package
v0.0.0-...-169d7d5 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 36 Imported by: 0

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

func StaticHandler() http.Handler

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.

Jump to

Keyboard shortcuts

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