Documentation
¶
Overview ¶
Package notifywiring assembles the notify tool from the stores the platform already holds (#1723).
It is a seam rather than a method on the facade for the reason every other composition seam here is one: the facade is at its size budget, and composition is not behavior it should own. What it adds over notifylayer itself is the two adapters that join the portal's storage to the two narrow contracts the tool asks for -- reading an asset, and deciding who may read it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Wire ¶
func Wire(deps Deps)
Wire assembles the notify tool and registers it, or does nothing when this deployment cannot send at all.
The channel store and the enqueuer are built here rather than taken from the HTTP composition root's delivery handle, because the tool is registered on the MCP server during platform construction and that handle does not exist yet. Both are stateless over the same pool, so there is nothing to share: what must agree is the table, and it does.
Types ¶
type Deps ¶
type Deps struct {
// DB is the platform pool. nil registers no tool.
DB *sql.DB
// Server is the MCP server the tool is registered on. nil registers
// nothing.
Server *mcp.Server
// Enabled is the deployment's notifications setting. False registers no
// tool, so a deployment that turned notifications off does not advertise
// a way to send one.
Enabled bool
// Personas resolves which connections a persona reaches, which is what
// decides the channels a caller may send to.
Personas *persona.Registry
// Assets, Blobs, Shares and Collections are the portal stores publish
// reads an asset and its entitlement through. All nil leaves publish
// refusing and the other two actions unaffected.
Assets portal.AssetStore
Blobs portal.S3Client
Collections portal.CollectionStore
// PortalURL is the deployment's public address, for the link a published
// document carries.
PortalURL string
// AdminPersona is the persona whose reach is unrestricted.
AdminPersona string
// DigestHourUTC is the hour a daily channel's bulletin is scheduled for.
DigestHourUTC int
}
Deps are what the facade hands over. Every field is a value it already holds; nothing here reads configuration or opens a connection of its own.