Expand description
Puerto’s runtime core: the domain types every project generated by Puerto shares, whatever its entities and adapters — paged lists, the repository error, domain events with the ports their transports implement, and the mail ports, and the auth port.
No driver, no runtime, no I/O: a project’s domain layer depends on it (ADR-0017, ADR-0018).
Re-exports§
pub use auth::Autenticador;pub use auth::ErrorAuth;pub use auth::Principal;pub use error_repositorio::ErrorRepositorio;pub use eventos::ErrorDecodificacion;pub use eventos::EventoDominio;pub use eventos::ManejadorEvento;pub use eventos::ResultadoManejo;pub use eventos::SobreEvento;pub use paginacion::LIMITE_PAGINA_MAXIMO;pub use paginacion::LIMITE_PAGINA_POR_DEFECTO;pub use paginacion::Pagina;pub use paginacion::PeticionPagina;
Modules§
- auth
- Auth (ADR-0021): who is calling and the port that says so. A route sees a
Principal, never a token; where the token was checked — an OIDC provider, a local session — is theAutenticador’s business. The adapters arepuerto-auth’s andpuerto-sqlx’s, the HTTP side (BearerAuth,#[requiere_rol])puerto-web’s. - correo
- Mail (ADR-0020): the message a project sends and the ports that send it. A project’s
{Mail}EnviadorCorreoport takes its own typed data; its implementation renders the templates into anCorreoand hands it to aEnviadorCorreo. The SMTP adapter ispuerto-correo’s, the sent logpuerto-sqlx’s. - error_
repositorio - eventos
- Domain events (ADR-0018): what a write records in the outbox, and the transport-neutral parts every transport shares — the envelope, the handler a consumer implements, the delivery policy and the ports the worker drives.
- paginacion