notifications

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package notifications holds the viewer-scoped notifications inbox at the reserved top-level /notifications name (spec doc 02 section 1.1). The inbox is backed by the notifications domain layer: it lists the viewer's threads, newest first, with an Inbox (unread) and an All filter, both served by the same domain query the REST /notifications endpoint runs, so the page and the API never disagree about what the viewer is subscribed to. An anonymous request bounces to the sign-in form with return_to carrying the inbox, the 302 github.com answers. When the notifications service is not wired the route still exists and renders the empty-inbox blankslate.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deps

type Deps struct {
	Notifications *domain.NotificationService
	Repos         *domain.RepoService
	Render        *render.Set
	View          *view.Builder
	Logger        *slog.Logger
}

Deps are the inbox handler's dependencies: the notifications domain service every list runs through, the repo service that resolves each thread's repository for its link and full name, the render set, the view builder for the shell chrome, and a logger.

type Handlers

type Handlers struct {
	// contains filtered or unexported fields
}

Handlers is the inbox handler set. One is built at boot and shared; it holds no per-request state.

func New

func New(d Deps) *Handlers

New wires the handler set from its dependencies.

func (*Handlers) Index

func (h *Handlers) Index(c *mizu.Ctx) error

Index renders /notifications, the viewer's inbox. An anonymous request bounces to the sign-in form carrying the inbox as return_to.

Jump to

Keyboard shortcuts

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