1// Package community owns the tenant's membership, moderation, invitations,2// rooms, agents and audit records.3//4// A Service stores community state in the tenant database and exposes direct5// operations plus transaction hooks for event ingestion. Methods whose names6// end in Tx and accept *sql.Tx use a transaction owned by the caller and leave7// commit or rollback to that caller. Event handlers whose callback accepts8// *sql.Tx open and close the transaction internally; the callback stores the9// accepted event in that transaction, so event, community state and10// projection work commit or roll back together.11//12// Community policy is read through the function supplied to ConfigurePolicy.13// Records consumes the narrow read model implemented by Members,14// MemberStatus and ModerationCounts, which keeps records independent of the15// community tables.16package community