| 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 direct |
| 5 | // operations plus transaction hooks for event ingestion. Methods whose names |
| 6 | // end in Tx and accept *sql.Tx use a transaction owned by the caller and leave |
| 7 | // commit or rollback to that caller. Event handlers whose callback accepts |
| 8 | // *sql.Tx open and close the transaction internally; the callback stores the |
| 9 | // accepted event in that transaction, so event, community state and |
| 10 | // 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 the |
| 15 | // community tables. |
| 16 | package community |