Documentation
¶
Overview ¶
Package web wires the chi router, templ views, and static assets that make up the snapdiff review UI.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FinalizeFunc ¶
FinalizeFunc is invoked when the reviewer hits Finalize. It receives the items in their session order; the implementation typically calls internal/apply and records the result for the cmd to emit on stdout.
type GalleryServer ¶
type GalleryServer struct {
// contains filtered or unexported fields
}
GalleryServer exposes a read-only baseline-browsing UI. It is independent of the diff-review Server: no session, no verdicts, no finalize.
func NewGalleryServer ¶
func NewGalleryServer(items []gallery.Item, repoDir, publicURL string) *GalleryServer
NewGalleryServer wires the gallery router. The caller owns the lifecycle.
func (*GalleryServer) Handler ¶
func (g *GalleryServer) Handler() http.Handler
Handler returns the http.Handler suitable to mount on an http.Server.
func (*GalleryServer) PublicURL ¶
func (g *GalleryServer) PublicURL() string
PublicURL is the URL that the cmd prints to stdout.
func (*GalleryServer) SetRepoLabel ¶
func (g *GalleryServer) SetRepoLabel(label string)
SetRepoLabel customizes the namespace shown in the brand area.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server bundles the session, the pixel-diff cache, and a finalize callback behind an http.Handler.
func NewServer ¶
func NewServer(s *review.Session, d *imdiff.Differ, publicURL string, onFinalize FinalizeFunc) *Server
NewServer assembles the router.
func (*Server) SetRepoLabel ¶
SetRepoLabel customizes the namespace shown in the brand area (e.g. "ios-app/").