Documentation
¶
Overview ¶
Package home holds the Githome web front's landing surface: the root page at / and its named twin at /dashboard. The root switches on the viewer the session middleware resolved: a signed-in viewer gets the dashboard (their repositories and their recent activity), an anonymous one the sign-in landing. /dashboard is the same dashboard at a stable URL, so a bookmark survives being signed out: an anonymous request there bounces to the sign-in form with return_to, the settings rule, because the page is function-private rather than secret. Both routes render the same template from the same model, so the two URLs can never drift apart. The feed reads the viewer's own event timeline through the same catalog the profile timeline uses (fe/web/profile.FeedItems); Githome has no follow graph, so "your feed" is honestly your own recent activity, not a faked network feed. See Spec 2005 docs 02 and 04.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deps ¶
type Deps struct {
Repos *domain.RepoService
Events *domain.EventService
Render *render.Set
View *view.Builder
Logger *slog.Logger
}
Deps are the home handlers' dependencies: the repo service for the sidebar list, the event service for the activity feed, the render set, the view builder for the chrome, and a logger. Either service may be nil; the dashboard then renders without that panel, the same degrade the profile takes.
type Handlers ¶
type Handlers struct {
// contains filtered or unexported fields
}
Handlers is the home handler set. One is built at boot and shared; it holds no per-request state.