Documentation
¶
Overview ¶
Package principal carries the authenticated user through the request context.
It is its own package so both graph (which sets the user in the auth middleware) and app (which reads it to scope every query to that user) can depend on it without importing each other.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UserFromContext ¶
UserFromContext returns the authenticated user, or nil if there is none. A nil user is the caller's signal that the request is unauthenticated — every data-access path must treat that as "no access", never as "all access".
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.