Documentation
¶
Overview ¶
Package sessionapi serves the /api/v1/portal/sessions surface: the sessions the calling user ran, and one of them opened in full.
It is the caller-scoped face of the same read model the operator surface in internal/admin/sessionapi reads (internal/platform/sessionview), not a second derivation of it. The only difference between the two is the scope: every read here carries the caller's user id, so a session id belonging to someone else is answered as not-found rather than as a refusal, and the answer is the same one an id that was never used gets.
A user reading their own sessions is reading their own audit history, which the portal already exposes in aggregate on the activity dashboard. What this adds is the individual session: the calls it made, the reason stated for each, and what it left behind.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Sessions is the session read model over the audit log.
Sessions Store
}
Config carries what the routes need. A nil Sessions leaves them unregistered: without a database there is no audit history to derive a session from.
type Store ¶
type Store = sessionview.Store
Store reads sessions. Aliased to the read model's own declaration rather than restated so the two cannot drift.